delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/01/05/04:01:04

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <3FF9241B.2060501@earthlink.net>
From: Martin Ambuhl <mambuhl AT earthlink DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en, de, fr, ru, el, zh
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Does using '-std=c99' with gcc 3.3.x cause '__STRICT_ANSI__'
to be defined?
References: <btarqo$kgr$1 AT au-nws-0001 DOT flow DOT com DOT au>
In-Reply-To: <btarqo$kgr$1@au-nws-0001.flow.com.au>
Lines: 33
Date: Mon, 05 Jan 2004 08:45:01 GMT
NNTP-Posting-Host: 65.178.17.185
X-Complaints-To: abuse AT earthlink DOT net
X-Trace: newsread1.news.atl.earthlink.net 1073292301 65.178.17.185 (Mon, 05 Jan 2004 00:45:01 PST)
NNTP-Posting-Date: Mon, 05 Jan 2004 00:45:01 PST
Organization: EarthLink Inc. -- http://www.EarthLink.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

bdeck wrote:
<nothing>

Please do not hide questions in the subject line.
This one you could answer for yourself:

#include <stdio.h>

int main(void)
{
	printf("[Output]\n");
#if defined(__STRICT_ANSI__)
	printf("__STRICT_ANSI__ defined\n");
#else
	printf("__STRICT_ANSI__ not defined\n");
#endif
	return 0;
}

gcc -O2 -W -Wall -Wwrite-strings -std=c99 -pedantic a.c 2>a.e
./a
[Output]
__STRICT_ANSI__ defined

gcc -std=c99 -pedantic a.c 2>a.e
./a
[Output]
__STRICT_ANSI__ defined


-- 
Martin Ambuhl

- Raw text -


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