public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "Arsen Arsenović" <arsen@aarsen.me>
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>,
	gcc-patches@gcc.gnu.org, "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>,
	"Joseph S. Myers" <joseph@codesourcery.com>,
	Jason Merrill <jason@redhat.com>
Subject: Re: Handling of main() function for freestanding
Date: Thu, 13 Oct 2022 19:10:10 +0200	[thread overview]
Message-ID: <Y0hGckL/O3vH6Mgr@tucnak> (raw)
In-Reply-To: <16718001.dR7co8bJll@bstg>

On Thu, Oct 13, 2022 at 07:03:24PM +0200, Arsen Arsenović wrote:
> @@ -1,10 +1,10 @@
>  /* Check for "noreturn" warning in main. */
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -Wmissing-noreturn -ffreestanding" } */
> +/* { dg-options "-O2 -Wmissing-noreturn" } */
>  extern void exit (int) __attribute__ ((__noreturn__));
>  
> -int
> -main (void) /* { dg-warning "function might be candidate for attribute 'noreturn'" "warn for main" } */
> +void
> +f (void) /* { dg-warning "function might be candidate for attribute 'noreturn'" "warn for main" } */
>  {
>    exit (0);
>  }

Don't we have such a test already elsewhere?  If not, then certain
"warn for main" part should be removed or replaced...

	Jakub


  reply	other threads:[~2022-10-13 17:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAH6eHdRr2uYW=Q8BKvhx472LXkT+nCKQg4uYAETNCs+b=YY7GA@mail.gmail.com>
     [not found] ` <CAH6eHdSWbgYy2qaneHyeEMAVLhkgZGjjtoRO4D5Dy5HOfmP95Q@mail.gmail.com>
     [not found]   ` <2489d88a-e80b-2f89-bac5-07c0b70bc175@redhat.com>
2022-10-13 17:03     ` Arsen Arsenović
2022-10-13 17:10       ` Jakub Jelinek [this message]
2022-10-13 17:26         ` Arsen Arsenović
2022-10-13 17:24       ` Jason Merrill
2022-10-13 20:14         ` Arsen Arsenović
2022-10-13 21:16           ` Jason Merrill
2022-10-14 10:04             ` Arsen Arsenović
2022-10-14 15:17               ` Jason Merrill
2022-10-21 10:33               ` Ping (c,c++): " Arsen Arsenović
2022-10-21 21:02                 ` Joseph Myers
2022-10-23 11:54                   ` Arsen Arsenović
2022-10-24 13:46                     ` Jason Merrill

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=Y0hGckL/O3vH6Mgr@tucnak \
    --to=jakub@redhat.com \
    --cc=arsen@aarsen.me \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=jwakely.gcc@gmail.com \
    /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).