From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7680 invoked by alias); 10 Oct 2006 18:59:13 -0000 Received: (qmail 7672 invoked by uid 22791); 10 Oct 2006 18:59:12 -0000 X-Spam-Check-By: sourceware.org Received: from caip.rutgers.edu (HELO caip.rutgers.edu) (128.6.236.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Oct 2006 18:59:04 +0000 Received: from caipclassic.rutgers.edu (caipclassic.rutgers.edu [128.6.237.54]) by caip.rutgers.edu (8.13.5/8.13.5) with ESMTP id k9AIx1BK010845 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Oct 2006 14:59:01 -0400 Date: Tue, 10 Oct 2006 19:31:00 -0000 From: "Kaveh R. GHAZI" To: gcc-patches@gcc.gnu.org, ebotcazou@libertysurf.fr Subject: [PATCH]: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg00570.txt.bz2 The builtins-config.h file determines whether various testcases should check C99 features in GCC. The solaris10 block in there never activated because it looks for a macro that's defined in on solaris10 but we never include the header. I was thinking of including guarded by #ifdef __sun, but I wasn't sure that header existed in all solaris versions. I later realized that is included by many other system headers, being among them. Since is already included by builtins-config.h, I don't have to add any headers I just have to move the solaris block to after where is already included. That seems safer to me. Tested via "make check" on solaris10 and solaris7. If there are no objections, I'll install it as "obvious" on all active branches after 24 hours. Thanks, --Kaveh 2006-10-10 Kaveh R. Ghazi * gcc.dg/builtins-config.h: Move Solaris section after inclusion of . diff -rup orig/egcc-SVN20061008/gcc/testsuite/gcc.dg/builtins-config.h egcc-SVN20061008/gcc/testsuite/gcc.dg/builtins-config.h --- orig/egcc-SVN20061008/gcc/testsuite/gcc.dg/builtins-config.h 2006-10-08 01:32:12.000000000 -0400 +++ egcc-SVN20061008/gcc/testsuite/gcc.dg/builtins-config.h 2006-10-10 13:51:04.452809164 -0400 @@ -11,15 +11,6 @@ #if defined(__hppa) && defined(__hpux) /* PA HP-UX doesn't have the entire C99 runtime. */ -#elif defined(__sun) && __STDC_VERSION__ - 0 < 199901L -/* Solaris up to 9 doesn't have the entire C99 runtime. - Solaris 10 defines _STDC_C99 if __STDC_VERSION__ is >= 199901L. - But, if you're including this file, you probably want to test the - newer behaviour, so: */ -#error forgot to set -std=c99. -#elif defined(__sun) && ! defined (_STDC_C99) -/* Solaris up to 9 doesn't have the entire C99 runtime. - Solaris 10 defines _STDC_C99 if __STDC_VERSION__ is >= 199901L. */ #elif defined(__sgi) /* Irix6 doesn't have the entire C99 runtime. */ #elif defined(__FreeBSD__) && (__FreeBSD__ < 5) @@ -49,6 +40,15 @@ lacks the C99 functions. */ #include #if defined(_NEWLIB_VERSION) || defined(__UCLIBC__) +#elif defined(__sun) && __STDC_VERSION__ - 0 < 199901L +/* If you're including this file, you probably want to test the newer + behaviour, so ensure the right flags were used for each test: */ +#error forgot to set -std=c99. +#elif defined(__sun) && ! defined (_STDC_C99) +/* Solaris up to 9 doesn't have the entire C99 runtime. + Solaris 10 defines _STDC_C99 if __STDC_VERSION__ is >= 199901L. + This macro is defined in which is included by + various system headers, in this case above. */ #else #define HAVE_C99_RUNTIME #endif