public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kaveh R. GHAZI" <ghazi@caip.rutgers.edu>
To: gcc-patches@gcc.gnu.org, ebotcazou@libertysurf.fr
Subject: [PATCH]:
Date: Tue, 10 Oct 2006 19:31:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.58.0610101443500.12282@caipclassic.rutgers.edu> (raw)


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 <sys/feature_tests.h> on
solaris10 but we never include the header.

I was thinking of including <sys/feature_tests.h> guarded by #ifdef __sun,
but I wasn't sure that header existed in all solaris versions.  I later
realized that <sys/feature_tests.h> is included by many other system
headers, <sys/types.h> being among them.

Since <sys/types.h> 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
<sys/types.h> 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  <ghazi@caip.rutgers.edu>

	* gcc.dg/builtins-config.h: Move Solaris section after inclusion
	of <sys/types.h>.

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 <sys/types.h>
 #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 <sys/feature_tests.h> which is included by
+   various system headers, in this case <sys/types.h> above.  */
 #else
 #define HAVE_C99_RUNTIME
 #endif

             reply	other threads:[~2006-10-10 18:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-10 19:31 Kaveh R. GHAZI [this message]
     [not found] <ormtqpsbuc.fsf@lxoliva.fsfla.org>
2021-09-09  7:11 ` [PATCH] strub: machine-independent stack scrubbing Alexandre Oliva
2022-07-29  6:16   ` [PATCH v2 00/10] Introduce " Alexandre Oliva
2023-06-16  6:09     ` [PATCH v3] " Alexandre Oliva
2023-10-20  6:03       ` [PATCH v4] " Alexandre Oliva
2023-10-26  6:15         ` Alexandre Oliva
2023-11-20 12:40           ` Alexandre Oliva
2023-11-22 14:14             ` Richard Biener
2023-11-23 10:56               ` Alexandre Oliva
2023-11-23 12:05                 ` Richard Biener
2023-11-29  8:53                   ` Alexandre Oliva
2023-11-29 12:48                     ` Richard Biener
2023-11-30  4:13                       ` Alexandre Oliva
2023-11-30 12:00                         ` Richard Biener
2023-12-02 17:56                           ` [PATCH v5] " Alexandre Oliva
2023-12-06  8:36                             ` Causes to nvptx bootstrap fail: " Tobias Burnus
2023-12-06 11:32                               ` Thomas Schwinge
2023-12-06 22:12                                 ` Alexandre Oliva
2023-12-07  3:33                                   ` [PATCH] strub: enable conditional support Alexandre Oliva
2023-12-07 16:44                                     ` Thomas Schwinge
2023-12-07 17:52                                       ` [PATCH] Alexandre Oliva
2023-12-08  6:46                                         ` [PATCH] Richard Biener
  -- strict thread matches above, loose matches on Subject: below --
2006-05-10 10:44 [patch] François-Xavier Coudert
     [not found] <no.id>
2004-05-04  0:50 ` [PATCH] Ulrich Weigand
2004-05-04  0:52   ` [PATCH] Eric Christopher
2004-05-04  0:42 [PATCH] Ulrich Weigand
2004-05-04  0:52 ` [PATCH] Eric Christopher
2004-05-04  1:14   ` [PATCH] Ulrich Weigand
2004-05-04  2:05     ` [PATCH] Eric Christopher
2004-05-04  1:11 ` [PATCH] Eric Christopher
2004-05-04  1:14   ` [PATCH] Ulrich Weigand
2004-05-04  0:26 [PATCH] Eric Christopher
2004-02-08 22:05 [PATCH] Bernardo Innocenti
2004-02-08 22:55 ` [PATCH] Richard Henderson
2004-02-21 13:45   ` [PATCH] Richard Henderson
2004-02-21 13:45 ` [PATCH] Bernardo Innocenti
2003-12-16 14:00 [PATCH] Hartmut Penner
2003-12-16 17:36 ` [PATCH] Zack Weinberg
2003-02-20 12:36 [PATCH] Zdenek Dvorak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.58.0610101443500.12282@caipclassic.rutgers.edu \
    --to=ghazi@caip.rutgers.edu \
    --cc=ebotcazou@libertysurf.fr \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).