c-std-porting.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: GCC Development <gcc@gcc.gnu.org>, c-std-porting@lists.linux.dev
Subject: Re: C89isms in the test suite
Date: Mon, 14 Nov 2022 04:36:17 +0000	[thread overview]
Message-ID: <BAFDDA68-8E38-4EA0-9623-CA32CBFE6192@gentoo.org> (raw)
In-Reply-To: <87wn8tbmdr.fsf@oldenburg.str.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]



> On 21 Oct 2022, at 09:40, Florian Weimer via Gcc <gcc@gcc.gnu.org> wrote:
> 
> What should we do about these when they are not relevant to what's being
> tested?  For example, gcc/testsuite/gcc.c-torture/execute/ieee/mzero6.c
> has this:
> 
>  int main ()
>  {
>    if (__builtin_copysign (1.0, func (0.0 / -5.0, 10)) != -1.0)
>      abort ();
>    exit (0);
>  }
> 
> but no include files, so abort and exit are implicitly declared.
> 
> Should we inject a header with -include with the most common
> declarations (which includes at least abort and exit)?  Or add the
> missing #include directives?  But the latter might not work for
> freestanding targets.
> 
> Implicit ints and function declarations without prototypes are also
> common (not just for main).
> 
> Other tests look like they might be intended to be built in C89 mode,
> e.g.  gcc/testsuite/gcc.c-torture/compile/386.c, although it's not
> immediately obvious to me what they test.

Would you be able to backport 6be2672e4ee41c566a9e072088cccca263bab5f7
and 885b6660c17fb91980b5682514ef54668e544b02 to the active <13
branches?

Thanks,
sam

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

       reply	other threads:[~2022-11-14  4:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87wn8tbmdr.fsf@oldenburg.str.redhat.com>
2022-11-14  4:36 ` Sam James [this message]
2022-11-14  8:19   ` C89isms in the test suite Florian Weimer
2022-11-15  5:05     ` Sam James
2022-11-21 11:12     ` Jakub Jelinek

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=BAFDDA68-8E38-4EA0-9623-CA32CBFE6192@gentoo.org \
    --to=sam@gentoo.org \
    --cc=c-std-porting@lists.linux.dev \
    --cc=fweimer@redhat.com \
    --cc=gcc@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 NNTP newsgroup(s).