AIX stdio.h implicitly includes sys/types.h, which implicitly includes
inttypes.h. With a recent AIX header fixincludes change to unilaterally
define STDC Macros, the GCC testsuite uses of inttypes now fails.
This patch explicitly defines the _STD_TYPES_T macro when the test is
run on AIX so that the inttypes.h header behaves as the testcase requires.
gcc/testsuite/ChangeLog:
2020-09-29 David Edelsohn <dje.gcc@gmail.com>
* g++.dg/spellcheck-inttypes.C: Define _STD_TYPES_T on AIX.
* gcc.dg/spellcheck-inttypes.c: Same.
/* { dg-options "-std=c++11" } */
+#ifdef _AIX
+#define _STD_TYPES_T
+#endif
#include <cstdio>
#include <cstdint>
/* Missing <cinttypes>. */
/* { dg-options "-std=c99" } */
/* Prevent AIX from implicitly including inttypes.h. */
#ifdef _AIX
-#define _H_INTTYPES_TYPE_TS
+#define _STD_TYPES_T
#endif
#include <stdio.h>
#include <stdint.h>