[Bug c++/50732] [type_traits] is_base_of<Base, Derived> unnecessarily instantiates Base (which shouldn't be instantiated)
paolo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Oct 15 19:49:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50732
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-10-15 19:49:36 UTC ---
Author: paolo
Date: Sat Oct 15 19:49:33 2011
New Revision: 180048
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180048
Log:
/cp
2011-10-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50732
* semantics.c (finish_trait_expr): Do not try to instantiate the
the base type of an __is_base_of trait.
(check_trait_type): Return a tree; use complete_type_or_else.
/testsuite
2011-10-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50732
* g++.dg/ext/is_base_of_incomplete.C: New.
* g++.dg/ext/is_base_of_diagnostic.C: Adjust dg-errors.
* g++.dg/ext/unary_trait_incomplete.C: Likewise.
Added:
trunk/gcc/testsuite/g++.dg/ext/is_base_of_incomplete.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ext/is_base_of_diagnostic.C
trunk/gcc/testsuite/g++.dg/ext/unary_trait_incomplete.C
More information about the Gcc-bugs
mailing list