public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-3529] testsuite: Prevent spellcheck-inttypes failures on AIX.
@ 2020-09-29 15:17 David Edelsohn
0 siblings, 0 replies; only message in thread
From: David Edelsohn @ 2020-09-29 15:17 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:74b5b8dec467f922f6c40a320859054081c7bb09
commit r11-3529-g74b5b8dec467f922f6c40a320859054081c7bb09
Author: David Edelsohn <dje.gcc@gmail.com>
Date: Sun Sep 27 11:47:25 2020 -0400
testsuite: Prevent spellcheck-inttypes failures on AIX.
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.
Diff:
---
gcc/testsuite/g++.dg/spellcheck-inttypes.C | 3 +++
gcc/testsuite/gcc.dg/spellcheck-inttypes.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/testsuite/g++.dg/spellcheck-inttypes.C b/gcc/testsuite/g++.dg/spellcheck-inttypes.C
index 84bfc125513..fea30960886 100644
--- a/gcc/testsuite/g++.dg/spellcheck-inttypes.C
+++ b/gcc/testsuite/g++.dg/spellcheck-inttypes.C
@@ -1,4 +1,7 @@
/* { dg-options "-std=c++11" } */
+#ifdef _AIX
+#define _STD_TYPES_T
+#endif
#include <cstdio>
#include <cstdint>
/* Missing <cinttypes>. */
diff --git a/gcc/testsuite/gcc.dg/spellcheck-inttypes.c b/gcc/testsuite/gcc.dg/spellcheck-inttypes.c
index 1146a7cff5b..611d7f02258 100644
--- a/gcc/testsuite/gcc.dg/spellcheck-inttypes.c
+++ b/gcc/testsuite/gcc.dg/spellcheck-inttypes.c
@@ -1,7 +1,7 @@
/* { 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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-29 15:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 15:17 [gcc r11-3529] testsuite: Prevent spellcheck-inttypes failures on AIX David Edelsohn
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).