[Bug libstdc++/92927] Bootstrap failed with CXXFLAGS="-O0"

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 19 10:05:00 GMT 2019


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Hongyu Wang from comment #0)
> It seems to happen after r277588.

Thanks for tracking down the revision that caused it.

The problem is that the functions are 'constexpr' for C++14 mode (and therefore
they are implicitly inline functions). It's undefined for an inline function to
not be declared inline in all translation units.

It seems that one TU is expecting the function to be defined elsewhere, but the
other TUs think it's inline so don't bother emitting a definition.

(More generally, this suggests a broader compatibility problem when adding
'constexpr' dependent on the -std mode.)


More information about the Gcc-bugs mailing list