diff options
author | Marc Poulhiès <poulhies@adacore.com> | 2023-11-06 12:01:17 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-12-07 14:29:59 +0100 |
commit | 45eb2c703c02fa2a5467efcdfb27692df37e4d75 (patch) | |
tree | 9eb97012ea84bc08315f2a89e375ae159dd070df | |
parent | 249404649d26f544d1ad6808625807532c2b6a42 (diff) | |
download | gcc-45eb2c703c02fa2a5467efcdfb27692df37e4d75.zip gcc-45eb2c703c02fa2a5467efcdfb27692df37e4d75.tar.gz gcc-45eb2c703c02fa2a5467efcdfb27692df37e4d75.tar.bz2 |
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.
-rw-r--r-- | gcc/testsuite/gcc.dg/analyzer/fd-4.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-4.c b/gcc/testsuite/gcc.dg/analyzer/fd-4.c index 3a961e4..880de3d 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 |