This is the mail archive of the
mailing list for the libstdc++ project.
Re: Include guard conflict
- From: Andreas Jaeger <aj at suse dot de>
- To: jan at etpmod dot phys dot tue dot nl
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sun, 13 Jul 2003 16:01:40 +0200
- Subject: Re: Include guard conflict
- References: <email@example.com>
Jan Van Dijk <firstname.lastname@example.org> writes:
> Hi all,
> when I compiled my code with g++ (mainline) I got horrible errors. The problem
> turned out to be the changed include guards of the file bits/stl_vector.h.
> gcc-3.2 has: #ifndef __GLIBCPP_INTERNAL_VECTOR_H
> wheras mainline uses: #ifndef _VECTOR_H
> The latter was also used in my (numerical vector) header file, as a result its
> contents were no longer included...
The C standard reserves all identifiers starting with _ for the C
Library. I expect the C++ standard has similar wording. So - if C++
has the same requirement -, using _VECTOR_H in one of your non-system
libraries is out of the spec and your code code is broken.
Andreas Jaeger, email@example.com, http://www.suse.de/~aj
SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126