This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Error in stl_bvector.h and vector.tcc
- From: Marcus Meissner <meissner at suse dot de>
- To: Hillel Markowitz <sabba dot hillel at verizon dot net>
- Cc: pcarlini at suse dot de, gdr at acm dot org, gcc at gcc dot gnu dot org
- Date: Thu, 10 Jun 2004 00:09:48 +0200
- Subject: Re: Error in stl_bvector.h and vector.tcc
- References: <20040609171435.MFZC29216.out009.verizon.net@outgoing.verizon.net>
On Wed, Jun 09, 2004 at 01:14:35PM -0400, Hillel Markowitz wrote:
> The following code causes gcc-3.4.0 to find a compile error in stl_bvector.h and vector.tcc
>
> #include <fstream>
>
> #ifdef __cplusplus
> extern "C"
> {
> #ifndef max
> #define max(x,y) ( ((x) > (y)) ? (x) : (y) )
> #endif
>
> #ifndef min
> #define min(x,y) ( ((x) < (y)) ? (x) : (y) )
> #endif
> #ifdef __cplusplus
> }
> #endif
>
> #include <vector>
> using namespace std;
>
> int main(int argc, char **argv)
> {
> }
>
> If the vector line is moved before the max, min definitions, the error does not occur. if the fstream include is removed, the error does not occur.
Where is the #endif for the first #ifdef __cplusplus ?
Ciao, Marcus