www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/17/02:55:21

Date: Wed, 17 Jun 1998 09:54:48 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Gerhard Gruber <sparhawk AT eunet DOT at>
cc: djgpp AT delorie DOT com
Subject: Re: Question concerning gcc and C++
In-Reply-To: <3592e0a4.5385268@news.Austria.EU.net>
Message-ID: <Pine.SUN.3.91.980617095157.18792Q-100000@is>
MIME-Version: 1.0

On Tue, 16 Jun 1998, Gerhard Gruber wrote:

> I thought that calling gcc with the language option should switch to the the
> appropriate mode. But I get errors compiling this file and it appears as if
> the compiler still doesn't switch correctly to C++ mode.
> 
> I get the follwing message:
> 
> In file included from d:/gnu/lang/cxx/libio.h:30,
>                  from d:/gnu/lang/cxx/streambuf.h:36,
>                  from d:/gnu/lang/cxx/iostream.h:31,
>                  from test.c:2:
> d:/gnu/lang/cxx/_G_config.h:20: parse error before `__extension__'
> In file included from test.c:2:
> d:/gnu/lang/cxx/iostream.h:91: parse error before `__extension__'
> d:/gnu/lang/cxx/iostream.h:208: parse error before `__extension__'

This seems like GCC *does* compile the program as C++: it uses the C++ 
include directory in lang/cxx.  So your problem is elsewhere.

Can it be that you mix headers from GCC 2.7.2 with binaries from GCC 
2.8.x?

> The source is the same as I got it from the poster:

Since the problem is in the headers, there's no use in posting the source 
of the program: GCC doesn't complain about the source at all.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019