public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [committed] c: C2x removal of unprototyped functions
Date: Fri, 2 Sep 2022 08:16:17 +0200	[thread overview]
Message-ID: <CAFiYyc0XzJDoDms1wVVjAJcCpFkthN2SJqfPYwFJROFhhcPH7Q@mail.gmail.com> (raw)
In-Reply-To: <08891168-b92d-79cf-fbd6-32f02d391aae@gmail.com>

On Thu, Sep 1, 2022 at 11:18 PM Jeff Law via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
>
>
> On 9/1/2022 1:12 PM, Joseph Myers wrote:
> > C2x has completely removed unprototyped functions, so that () now
> > means the same as (void) in both function declarations and
> > definitions, where previously that change had been made for
> > definitions only.  Implement this accordingly.
> >
> > This is a change where GNU/Linux distribution builders might wish to
> > try builds with a -std=gnu2x default to start early on getting old
> > code fixed that still has () declarations for functions taking
> > arguments, in advance of GCC moving to -std=gnu2x as default maybe in
> > GCC 14 or 15; I don't know how much such code is likely to be in
> > current use.
> Happy to see this happen (dropping unprototyped funtions).  IIRC older
> versions of autoconf are going to generate code that runs afoul of this
> problem as well.

To catch these cases with a diagnostic earlier is
-Wstrict-prototypes -Wold-style-declaration enough to diagnose all cases
that the new standard will reject?

I suppose -W*-c2x-compat are not the correct vehicle to diagnose these?

Thanks,
Richard.

>
> jeff
>

  reply	other threads:[~2022-09-02  6:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01 19:12 Joseph Myers
2022-09-01 21:18 ` Jeff Law
2022-09-02  6:16   ` Richard Biener [this message]
2022-09-05 19:51     ` Joseph Myers

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=CAFiYyc0XzJDoDms1wVVjAJcCpFkthN2SJqfPYwFJROFhhcPH7Q@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@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).