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.