This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: extern "C" typedefs
- To: jmacd at paris dot CS dot Berkeley dot EDU (Josh MacDonald), egcs-bugs at cygnus dot com
- Subject: Re: extern "C" typedefs
- From: Jason Merrill <jason at cygnus dot com>
- Date: 22 Oct 1998 03:28:06 -0700
- References: <19981021231050.02295.cygnus.egcs.bugs@paris.CS.Berkeley.EDU>
>>>>> Josh MacDonald <jmacd@paris.CS.Berkeley.EDU> writes:
> This code compiles with every C compiler I've ever used, and
> also compiles with g++ 2.7.2. I am running:
> I may be falling behind in the seemingly perpetual evolution of C++,
> but since this is in an extern "C" scope, it seems that it should
> accept it.
Nope; extern "C" doesn't change the language rules, just linkage. In any
case, forward-declaring an enum is invalid in C as well.
Jason