public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114705] New: [DR 2763] Warn about [[noreturn]] that returns during constant evaluation
@ 2024-04-12 18:21 mpolacek at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: mpolacek at gcc dot gnu.org @ 2024-04-12 18:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114705

            Bug ID: 114705
           Summary: [DR 2763] Warn about [[noreturn]] that returns during
                    constant evaluation
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

clang++ warns here:

```
[[noreturn]] constexpr void f() {}
constexpr int x = (f(), 0);
```

l.C:1:36: warning: function declared 'noreturn' should not return
[-Winvalid-noreturn]
    1 |   [[noreturn]] constexpr void f() {}
      |                                    ^

but we don't.

Related to https://cplusplus.github.io/CWG/issues/2763.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-12 18:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12 18:21 [Bug c++/114705] New: [DR 2763] Warn about [[noreturn]] that returns during constant evaluation mpolacek at gcc dot gnu.org

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).