Commit 1f872df7 by Paolo Carlini Committed by Paolo Carlini

semantics.c (trait_expr_value, [...]): Implement the letter of 20.11.6 about…

semantics.c (trait_expr_value, [...]): Implement the letter of 20.11.6 about Base and Derived naming the same class...

/cp
2014-01-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
	the letter of 20.11.6 about Base and Derived naming the same
	class type modulo cv-qualifiers.

/testsuite
2014-01-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/ext/is_base_of_incomplete-2.C: New.

From-SVN: r206386
parent a0cbe71e
2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
* semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
the letter of 20.11.6 about Base and Derived naming the same
class type modulo cv-qualifiers.
2014-01-06 Adam Butcher <adam@jessamine.co.uk>
PR c++/59635
......
......@@ -7106,7 +7106,8 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2)
case CPTK_IS_BASE_OF:
return (NON_UNION_CLASS_TYPE_P (type1) && NON_UNION_CLASS_TYPE_P (type2)
&& DERIVED_FROM_P (type1, type2));
&& (same_type_ignoring_top_level_qualifiers_p (type1, type2)
|| DERIVED_FROM_P (type1, type2)));
case CPTK_IS_CLASS:
return (NON_UNION_CLASS_TYPE_P (type1));
......
2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/ext/is_base_of_incomplete-2.C: New.
2014-01-07 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/58668
......
struct T;
int check1[__is_base_of(T, T) ? 1 : -1];
int check2[__is_base_of(T, const T) ? 1 : -1];
int check3[__is_base_of(volatile T, T) ? 1 : -1];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment