[Bug c++/126422] New: differing noexcept incorrectly accepted for a local extern declaration

"pinskia at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126422

            Bug ID: 126422
           Summary: differing noexcept incorrectly accepted for a local
                    extern declaration
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
int noexcept_decl() noexcept(true);

void foo1() {
  extern int noexcept_decl() noexcept(false);
}
```

This is incorrectly accepted. If this was not a local decl, then GCC correctly
rejects it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.