[Bug c++/97306] New: local extern decls & contexpr
nathan at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Oct 6 13:47:16 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97306
Bug ID: 97306
Summary: local extern decls & contexpr
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nathan at gcc dot gnu.org
Target Milestone: ---
constexpr int *Foo (){
extern int i;
return &i;
}
int i;
static_assert(&i == Foo());
This should work
More information about the Gcc-bugs
mailing list