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 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Precedence: bulk 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