public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-6273] testsuite: refine gcc.dg/analyzer/fd-4.c test for newlib
@ 2023-12-07 13:43 Marc Poulhi?s
0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2023-12-07 13:43 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:45eb2c703c02fa2a5467efcdfb27692df37e4d75
commit r14-6273-g45eb2c703c02fa2a5467efcdfb27692df37e4d75
Author: Marc Poulhiès <poulhies@adacore.com>
Date: Mon Nov 6 12:01:17 2023 +0100
testsuite: refine gcc.dg/analyzer/fd-4.c test for newlib
Contrary to glibc, including stdio.h from newlib defines mode_t which
conflicts with the test's type definition.
.../gcc/testsuite/gcc.dg/analyzer/fd-4.c:19:3: error: redefinition of typedef 'mode_t' with different type
...
.../include/sys/types.h:189:25: note: previous declaration of 'mode_t' with type 'mode_t' {aka 'unsigned int'}
Defining _MODE_T_DECLARED skips the type definition.
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/fd-4.c: Fix for newlib.
Diff:
---
gcc/testsuite/gcc.dg/analyzer/fd-4.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-4.c b/gcc/testsuite/gcc.dg/analyzer/fd-4.c
index 3a961e4f813..880de3d7896 100644
--- a/gcc/testsuite/gcc.dg/analyzer/fd-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/fd-4.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-D_MODE_T_DECLARED=1" { target newlib } } */
#if defined(_AIX) || defined(__hpux)
#define _MODE_T
#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-07 13:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07 13:43 [gcc r14-6273] testsuite: refine gcc.dg/analyzer/fd-4.c test for newlib Marc Poulhi?s
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).