aix: Don't implicitly include inttypes.h
authorDavid Edelsohn <dje.gcc@gmail.com>
Wed, 10 Jun 2020 12:14:39 +0000 (08:14 -0400)
committerDavid Edelsohn <dje.gcc@gmail.com>
Thu, 11 Jun 2020 12:53:16 +0000 (08:53 -0400)
AIX stdio.h implicitly includes inttypes.h, which explicitly conflicts
with the purpose of this testcase.  This patch conditionally adds a macro
definition that inhibits the implicit inclusion.

gcc/testsuite/ChangeLog

2020-06-11  David Edelsohn  <dje.gcc@gmail.com>

* gcc.dg/spellcheck-inttypes.c: Don't include inttypes.h on AIX.

gcc/testsuite/gcc.dg/spellcheck-inttypes.c

index 56dc2f3dcfd9506349ea30fc320b87f83b8ca0fa..1146a7cff5b145997e90d4b3edcf7670ccceb276 100644 (file)
@@ -1,4 +1,8 @@
 /* { dg-options "-std=c99" } */
+/* Prevent AIX from implicitly including inttypes.h.  */
+#ifdef _AIX
+#define _H_INTTYPES_TYPE_TS
+#endif
 #include <stdio.h>
 #include <stdint.h>
 /* Missing <inttypes.h>.  */