c/10411: Why is __STDC_VERSION__ not defined? (gcc 2.96 & 3.1)

Grant Jacobs grant.jacobs@clear.net.nz
Tue Apr 15 22:54:00 GMT 2003


Yes, you're quite right... sorry. For some reason I thought that ISO 
amendment 1 (i.e. 1994) would be the default :(  (Never assume and 
all that...)  I didn't think that the default would be set so far 
back! After all 1994 is all of 9 years ago and I'd have naively 
thought that the dust would have well and truly settled on any issues 
with that amendment by now -- ?

While I'm writing, is there any sense for 'gcc --version' to also 
output the default version of the language(s), as I presume this 
occasionally changes. At some point, surely, you'll bring the default 
up to a more recent standard...?

Grant

At 8:29 PM +0100 15/4/03, Neil Booth wrote:
>grant.jacobs@clear.net.nz wrote:-
>
>>  Why is __STDC_VERSION__ not defined? I've tried this in gcc 2.96 & 3.1:
>>
>>
>>  #include <stdio.h>
>>
>>  #if defined __STDC_VERSION__
>>    #define avail "yes!"
>>  #else
>>    #define avail "nope"
>>  #endif
>>
>>  int main()
>>  {
>>    printf( "__STDC__ == '%d'\n", __STDC__ ) ;
>>    printf( "Is __STDC_VERSION__ defined: %s\n", avail ) ;
>>  }
>>
>>
>>  and it results in:
>>
>>
>>  __STDC__ == '1'
>  > Is __STDC_VERSION__ defined: nope
>
>You're compiling in C89 mode I imagine.
>
>Neil.


-- 
--------------------------------------------------------
Grant Jacobs                   grant.jacobs@clear.net.nz
McAndrew Bay, Dunedin,                ph. +64 3 476 1820
NEW ZEALAND.                         fax. +64 3 476 1825



More information about the Gcc-bugs mailing list