public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gerald Pfeifer <gerald@pfeifer.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Notes on the warnings-as-errors change in GCC 14
Date: Thu, 15 Feb 2024 23:58:43 +0100 (CET)	[thread overview]
Message-ID: <6702871e-689f-67ac-a761-b013c6aa9f0b@pfeifer.com> (raw)
In-Reply-To: <87edddaeac.fsf@oldenburg.str.redhat.com>

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

On Thu, 15 Feb 2024, Florian Weimer wrote:
>> Naive questions: Can definitions really be prototypes (in C)?
> Yes, I think so: definitions can be declarations, and function
> prototypes are declarations.  The standard uses the phrase “function
> definition that does not include a function prototype declarator”.
> Should I write “old-style function definition” instead?

I think that would have helped me (as a not too much of a language 
expert). Only make that change if you think it makes sense, though.

>>> +GCC will type-check function arguments after that, potentially
>>> +requiring further changes.  (Previously, the function declaration was
>>> +treated as not having no prototype.)
>> That second sentence uses double negation, which logically is the same as 
>> just the original statement.
> Other reviews suggests to change it to “not having [a] prototype”.

Ah, let's use that then.

>>> +By default, GCC still accepts returning an expression of
>>> +type <code>void</code> from within a function that itself
>>> +returns <code>void</code>, as a GNU extension that matches C++ rules
>>> +in this area.
 > Does the GNU extension match C++ (standard rules)?
> Yes.  Should I write “matches [standard] C++ rules”?

Looks good to me.

(At first I was confused, but I guess this is a GNU extension to the C 
standard - that matches standard C++ in this area?)

Gerald

  reply	other threads:[~2024-02-15 22:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02 16:59 Florian Weimer
2024-02-02 18:08 ` Jonathan Wakely
2024-02-15 15:57   ` Florian Weimer
2024-02-02 19:06 ` Jonathan Wakely
2024-02-08  7:04 ` Sam James
2024-02-15 16:07   ` Florian Weimer
2024-02-15 16:20     ` Sam James
2024-02-09 23:07 ` Gerald Pfeifer
2024-02-15 16:22   ` Florian Weimer
2024-02-15 22:58     ` Gerald Pfeifer [this message]
2024-02-15 16:49   ` Florian Weimer
2024-02-10 11:00 ` Gerald Pfeifer
2024-02-15 16:44   ` Florian Weimer
2024-02-16 21:23     ` Gerald Pfeifer

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=6702871e-689f-67ac-a761-b013c6aa9f0b@pfeifer.com \
    --to=gerald@pfeifer.com \
    --cc=fweimer@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).