[Bug c++/106141] Better wording for warning: ‘Child’ has a base ‘Base<(& hello)>’ whose type uses the anonymous namespace [-Wsubobject-linkage]

jlame646 at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Jun 30 04:14:11 GMT 2022


--- Comment #2 from Jason Liam <jlame646 at gmail dot com> ---
Note that if `child.hh` is included in multiple TUs, then the program will have
UB NDR as in each TU as the template argument in `Base<hello>` is a pointer to
an entity with internal linkage meaning in each TU it will refer to a different
entity local to that TU.

More information about the Gcc-bugs mailing list