https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124621
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ok, managed to reproduce it.
The difference is that in the in-tree testing, the libstdc++ includes aren't
marked as system headers:
/usr/src/gcc/obj/gcc/testsuite/g++/../../xg++
-B/usr/src/gcc/obj/gcc/testsuite/g++/../../
/usr/src/gcc/gcc/testsuite/g++.dg/reflect/reflect_constant_string2.C
-fdiagnostics-plain-output -nostdinc++
-I/usr/src/gcc/obj/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
-I/usr/src/gcc/obj/x86_64-pc-linux-gnu/libstdc++-v3/include
-I/usr/src/gcc/libstdc++-v3/libsupc++
-I/usr/src/gcc/libstdc++-v3/include/backward
-I/usr/src/gcc/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++26
-pedantic-errors -Wno-long-long -freflection -S -o reflect_constant_string2.s
and then the aka printing in some cases looks nicer.
While in the out of tree testing the libstdc++ includes are marked as system
headers and instead of e.g.
‘std::ranges::range_value_t<std::vector<V> >’ {aka ‘V’}
we now print
‘std::ranges::range_value_t<std::vector<V> >’ {aka
‘std::iter_value_t<__gnu_cxx::__normal_iterator<V*, std::vector<V> > >’}
If I preprocess with the installed compiler and compile with the non-installed
one, I still see the ugly iter_value_t etc.,
while when I hand edit the *.ii file to replace
# .* 3
lines with just
# .*
then it prints just V. -Wsystem-headers vs. -Wno-system-headers doesn't affect
this.
Sure, we can tweak the tests so that they accept anything non-newline in the
aka operand, but wonder why this happens and if it is desirable.