https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120005
Nathaniel Shead <nshead at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=119097 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |nshead at gcc dot gnu.org Last reconfirmed| |2025-04-29 --- Comment #3 from Nathaniel Shead <nshead at gcc dot gnu.org> --- The error is because we don't fully implement https://eel.is/c++draft/basic.link#14.4, as constexpr functions and templates don't fold away non-ODR usages of internal linkage objects as constant expressions. I've not yet worked out a good way of doing this. The reason GCC14 didn't error was because we didn't check GMF entities for TU-local exposures at that time, but that can cause other issues. (I'd hoped to add a way to restore this behaviour for porting but ran out of time to do so.)