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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Another thing to do is mangling.
#include <meta>

template <std::meta::info I>
void foo ();

void
bar ()
{
  foo <^^::> ();
  foo <^^std::meta> ();
  //foo <std::meta::info {}> ();
  foo <std::meta::reflect_constant (42)> ();
}
The Bloomberg clang++ branch mangles these as
_Z3fooIMn$EEvv
_Z3fooIMnNSt3__14metaE$EEvv
_Z3fooIMvLi42EEEvv
where using $ in the mangled names is certainly wrong.
GCC mangles it as
_Z3fooIXL_Z2::EEEvv
_Z3fooIXL_ZSt4metaEEEvv
_Z3fooIXLi42EEEvv
which is obviously wrong too, :: in a mangled name can't appear, and
reflect_constant (42) argument shouldn't be mangled as a merge 42 constant
IMHO.
Plus on the commented out case we ICE.

Reply via email to