public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: <gcc@gcc.gnu.org>
Subject: Re: C2x features status
Date: Fri, 21 Oct 2022 22:19:07 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2210212216050.150427@digraph.polyomino.org.uk> (raw)
In-Reply-To: <874jvw7rm2.fsf@oldenburg.str.redhat.com>

On Fri, 21 Oct 2022, Florian Weimer wrote:

> > while typeof was enabled by default for -std=gnu* anyway 
> > in previous releases so is a lower risk.
> 
> Do the semantics of typeof change to align with C++, so that typeof
> (int) becomes invalid?

No.  Both typeof (expr) and typeof (type) are valid.

The changes to make typeof (expr) consistently avoid returning a qualified 
or atomic type when passed an rvalue argument (while preserving qualifiers 
on lvalues) mostly went into previous releases, but I found and fixed a 
few more cases when implementing standard typeof (and all those fixes are 
unconditional).

typeof in C2x mode does not treat const or noreturn function attributes as 
part of the type of a function or function pointer, unlike typeof in 
previous modes and __typeof even in C2x mode.

-- 
Joseph S. Myers
joseph@codesourcery.com

      reply	other threads:[~2022-10-21 22:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 17:30 Joseph Myers
2022-10-21 18:31 ` Florian Weimer
2022-10-21 19:14   ` Marek Polacek
2022-10-21 19:29     ` Arsen Arsenović
2022-10-21 19:55       ` Florian Weimer
2022-10-21 20:26         ` Arsen Arsenović
2022-10-21 21:11   ` Joseph Myers
2022-10-21 22:13     ` Florian Weimer
2022-10-21 22:19       ` Joseph Myers [this message]

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=alpine.DEB.2.22.394.2210212216050.150427@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --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 read-only IMAP folder(s) and NNTP newsgroup(s).