This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


The following reply was made to PR c/10411; it has been noted by GNATS.

From: Grant Jacobs <grant dot jacobs at clear dot net dot nz>
To: Neil Booth <neil at daikokuya dot co dot uk>
Cc: gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
Subject: Re: c/10411: Why is __STDC_VERSION__ not defined? (gcc 2.96 & 3.1)
Date: Wed, 16 Apr 2003 10:56:51 +1200

 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 dot jacobs at clear dot net dot 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 dot jacobs at clear dot net dot nz
 McAndrew Bay, Dunedin,                ph. +64 3 476 1820
 NEW ZEALAND.                         fax. +64 3 476 1825


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]