[Bug c++/49387] t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun May 15 16:29:29 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49387
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:5237059e04d105fe5441fa7434699eea9a34bf1b
commit r12-8378-g5237059e04d105fe5441fa7434699eea9a34bf1b
Author: Jason Merrill <jason@redhat.com>
Date: Fri Apr 15 00:11:00 2022 -0400
c++: typeid and instantiation [PR102651]
PR49387 was a problem with initially asking for a typeid for a class
template specialization before it was complete, and later actually filling
in the descriptor when the class was complete, and thus disagreeing on the
form of the descriptor. I fixed that by forcing the class to be complete,
but this testcase shows why that approach is problematic. So instead let's
adjust the type of the descriptor later if needed.
PR c++/102651
PR c++/49387
gcc/cp/ChangeLog:
* rtti.cc (get_tinfo_decl_direct): Don't complete_type.
(emit_tinfo_decl): Update tdesc type if needed.
gcc/testsuite/ChangeLog:
* g++.dg/rtti/typeid-complete1.C: New test.
More information about the Gcc-bugs
mailing list