_POSIX_C_SOURCE is predefined on hppa-hpux, so it needs to be
undefined before
it can be redefined.
Tested on hppa2.0-hp-hpux11.11 and hppa64-hp-hpux11.11. Committed to
trunk and
4.9 branch.
Dave
--
John David Anglin dave.ang...@bell.net
2014-08-07 John David Anglin <dang...@gcc.gnu.org>
* gcc.dg/atomic/c11-atomic-exec-4.c: Undefine _POSIX_C_SOURCE before
defining in dg-options.
* gcc.dg/atomic/c11-atomic-exec-5.c: Likewise.
Index: gcc.dg/atomic/c11-atomic-exec-4.c
===================================================================
--- gcc.dg/atomic/c11-atomic-exec-4.c (revision 213683)
+++ gcc.dg/atomic/c11-atomic-exec-4.c (working copy)
@@ -2,7 +2,7 @@
operating properly when operations on the same variable are carried
out in two threads. */
/* { dg-do run } */
-/* { dg-options "-std=c11 -pedantic-errors -pthread -D_POSIX_C_SOURCE=200809L"
} */
+/* { dg-options "-std=c11 -pedantic-errors -pthread -U_POSIX_C_SOURCE
-D_POSIX_C_SOURCE=200809L" } */
/* { dg-additional-options "-D_XOPEN_SOURCE=600" { target *-*-solaris2.1[0-9]*
} } */
/* { dg-require-effective-target pthread } */
Index: gcc.dg/atomic/c11-atomic-exec-5.c
===================================================================
--- gcc.dg/atomic/c11-atomic-exec-5.c (revision 213683)
+++ gcc.dg/atomic/c11-atomic-exec-5.c (working copy)
@@ -3,7 +3,7 @@
iterations of the compare-and-exchange loop are needed, exceptions
get properly cleared). */
/* { dg-do run } */
-/* { dg-options "-std=c11 -pedantic-errors -pthread -D_POSIX_C_SOURCE=200809L"
} */
+/* { dg-options "-std=c11 -pedantic-errors -pthread -U_POSIX_C_SOURCE
-D_POSIX_C_SOURCE=200809L" } */
/* { dg-add-options ieee } */
/* { dg-additional-options "-mfp-trap-mode=sui" { target alpha*-*-* } } */
/* { dg-additional-options "-D_XOPEN_SOURCE=600" { target *-*-solaris2.1[0-9]*
} } */