public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/95564] GCC rejects lambda expression with "noexcept(1+1)"
Date: Fri, 19 Jan 2024 18:47:39 +0000 [thread overview]
Message-ID: <bug-95564-4-LK7mSDbNUd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95564-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95564
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jiang An from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > GCC is inconsitent here. with static_assert and constexpr GCC accepts it (PR
> > 87724) while rejects it for noexcept.
>
> Currently narrowing conversions are still forbidden in noexcept and explicit
> specifiers.
>
> The inconsistency is acknowledged in C++23 (WG21-P1401R5), but it seems that
> P1401 is not a DR, as the related CWG 2320 is closed as extension. I don't
> know whether we should reject narrowing conversions in static_assert/if
> constexpr in earlier modes.
Narrowing conversions were fine in earlier standards, it was an accidental
change that made them ill-formed, which was fixed.
Clang now also rejects the testcase.
prev parent reply other threads:[~2024-01-19 18:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-06 16:18 [Bug c++/95564] New: " haoxintu at gmail dot com
2020-06-09 23:04 ` [Bug c++/95564] " mpolacek at gcc dot gnu.org
2021-12-09 6:51 ` pinskia at gcc dot gnu.org
2021-12-16 10:17 ` de34 at live dot cn
2024-01-19 18:47 ` jason at gcc dot gnu.org [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=bug-95564-4-LK7mSDbNUd@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).