From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16677 invoked by alias); 15 Apr 2003 22:56:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 16620 invoked by uid 71); 15 Apr 2003 22:56:01 -0000 Date: Tue, 15 Apr 2003 22:56:00 -0000 Message-ID: <20030415225601.16617.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Grant Jacobs Subject: Re: c/10411: Why is __STDC_VERSION__ not defined? (gcc 2.96 & 3.1) Reply-To: Grant Jacobs X-SW-Source: 2003-04/txt/msg00729.txt.bz2 List-Id: The following reply was made to PR c/10411; it has been noted by GNATS. From: Grant Jacobs To: Neil Booth Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.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.jacobs@clear.net.nz wrote:- > >> Why is __STDC_VERSION__ not defined? I've tried this in gcc 2.96 & 3.1: >> >> >> #include >> >> #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