delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2012/09/11/08:30:17

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
From: Martin Strömberg <ams AT ludd DOT ltu DOT se>
Message-Id: <201209111230.q8BCU0rl001296@dexter.ludd.ltu.se>
Subject: Re: Invalid tests for __STDC_VERSION__ in DJGPP header files
To: djgpp-workers AT delorie DOT com
Date: Tue, 11 Sep 2012 14:30:00 +0200 (MEST)
In-Reply-To: <504CD18B.1060207@iki.fi> from "Andris Pavenis" at Sep 09, 2012 08:27:39 PM
X-Mailer: ELM [version 2.5 PL6]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

According to Andris Pavenis:
> 
> -_STDC_VERSION__ is not defined in many cases any recent GCC version. It is only seems to be 
> defined in several cases depending on the command line parameter -std and for C language only
...
> As the result tests used in header files like
> 
> #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
>    || !defined(__STRICT_ANSI__)
> 
> are invalid.

Those tests aren't invalid. They are checking for __STDC_VERSION__ >=
199901L and not __STRICT_ANSI__.

It's possible that old gcc was lying and claiming conformance where it
wasn't.

...

> Use of the broken test for __STDC_VERSION__ prevents libstdc++-v3 (GCC-4.8.0 development versions 
> from some last weeks) building OK due to actual contents of stdint.h being compiled out. Variant 1 

That seems to say that libstdc++-v3 requires standard comliance in the
compiler. How about adding -std=c89/c99/whatever to libstdc++-v3's
compile options?


On the other hand I'm not sure I understand the problem properly so
perhaps I'm totally wrong.


-- 
MartinS

- Raw text -


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