[RFC] libstdc++/6720 and libstdc++/6671

Jonathan Wakely cow@compsoc.man.ac.uk
Fri May 24 08:57:00 GMT 2002


On Wed, May 22, 2002 at 06:01:17PM -0400, Phil Edwards wrote:

> On Tue, May 21, 2002 at 11:12:45PM -0700, Zack Weinberg wrote:
> >  If the ext/ header names can be made not to clash with
> > the standard ones, well and good; if not, tell people not to use 
> > -I $(prefix)/include/g++-3/ext and forget it.
> 
> We've done the latter already (earlier this week).
> 
> I am completely comfortable with requiring users to type
> 
>     #include <ext/whatever>
> 
> rather than <whatever> and fiddling with -I options.  The examples I
> gave in a PR audit trail somewhere are <sys/types.h> and <X11/Xcrap.h>
> and <net/if.h> and so forth.  Nobody writes "#include <types.h>" and then
> specifies -I/usr/include/sys (and lives to tell about it).

That's exactly what I think: system header directories shouldn't be -I'd,
they either get automatically added to the include path or are brought in
explicitly like <ext/...>

Preprocessor magic sounds like a bad idea to me, it obscures what's
happening. At least #6720 and #6671 it's obvious what the preprocessor is
doing and why it breaks, magic makes it harder to work such things out,
even when it's documented.

How would such preprocessor magic work when using g++ with STLPort or
other third party implementations?
#include <vector> would _always_ include the libstdc++ version, so STLPort
can't be used!

jon


-- 
"This Statement is False"
        (Courtesy of POEE)



More information about the Libstdc++ mailing list