This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] libstdc++/6720 and libstdc++/6671
- From: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- To: Phil Edwards <phil at jaj dot com>
- Cc: Zack Weinberg <zack at codesourcery dot com>,Gabriel Dos Reis <gdr at codesourcery dot com>,Nathan Myers <ncm-nospam at cantrip dot org>,Neil Booth <neil at daikokuya dot demon dot co dot uk>, libstdc++ at gcc dot gnu dot org
- Date: Fri, 24 May 2002 12:20:37 +0100
- Subject: Re: [RFC] libstdc++/6720 and libstdc++/6671
- References: <20020522061245.GA1812@codesourcery.com> <20020522180117.B14460@disaster.basement.lan>
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)