From: "Marc Poulhiès" <poulhies@adacore.com>
To: "Marc Poulhiès" <poulhies@adacore.com>
Cc: gcc-patches@gcc.gnu.org, dmalcolm@redhat.com
Subject: Re: [PATCH] testsuite: refine gcc.dg/analyzer/fd-4.c test for newlib
Date: Fri, 01 Dec 2023 17:22:03 +0100 [thread overview]
Message-ID: <87plzp6gfr.fsf@adacore.com> (raw)
In-Reply-To: <20231106110153.3863209-1-poulhies@adacore.com>
Marc Poulhiès <poulhies@adacore.com> writes:
> 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.
> ---
> Tested on x86_64-linux and x86_64-elf.
>
> Ok for master?
>
> 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 994bad84342..e4a834ade30 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 } } */
> #ifdef _AIX
> #define _MODE_T
> #endif
Ping ?
Thanks,
Marc
next prev parent reply other threads:[~2023-12-01 16:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 11:01 Marc Poulhiès
2023-12-01 16:22 ` Marc Poulhiès [this message]
2023-12-01 17:21 ` Mike Stump
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87plzp6gfr.fsf@adacore.com \
--to=poulhies@adacore.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).