Commit afb86620 by Paolo Carlini

re PR c++/36855 (__has_trivial_destructor() returns false for reference types.)

/cp
2008-07-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/36855
	* semantics.c (trait_expr_value): Update __has_trivial_destructor
	semantics to the current WP (N2691).

/testsuite
2008-07-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/36855
	* g++.dg/ext/has_trivial_destructor.C: Rename to...
	* g++.dg/ext/has_trivial_destructor-1.C: ... this.
	* g++.dg/ext/has_trivial_destructor-2.C: New.

From-SVN: r137914
parent b08c5108
2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36855
* semantics.c (trait_expr_value): Update __has_trivial_destructor
semantics to the current WP (N2691).
2008-07-16 Dodji Seketeli <dseketel@redhat.com> 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
PR c++/13699 PR c++/13699
* gcc/cp/name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
New function.
(pushdecl_maybe_friend): Check if a redeclaration of extern C function (pushdecl_maybe_friend): Check if a redeclaration of extern C function
complies with exception specification constraints. complies with exception specification constraints.
...@@ -22,8 +27,8 @@ ...@@ -22,8 +27,8 @@
PR c++/13101 PR c++/13101
* decl.c (grokdeclarator): Warn about initializing variables * decl.c (grokdeclarator): Warn about initializing variables
of storage class 'extern' only after the type of the declarator of storage class 'extern' only after the type of the declarator
has been properly computed. has been properly computed.
2008-07-11 Dodji Seketeli <dseketel@redhat.com> 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
......
...@@ -4730,7 +4730,7 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2) ...@@ -4730,7 +4730,7 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2)
case CPTK_HAS_TRIVIAL_DESTRUCTOR: case CPTK_HAS_TRIVIAL_DESTRUCTOR:
type1 = strip_array_types (type1); type1 = strip_array_types (type1);
return (pod_type_p (type1) return (pod_type_p (type1) || type_code1 == REFERENCE_TYPE
|| (CLASS_TYPE_P (type1) || (CLASS_TYPE_P (type1)
&& TYPE_HAS_TRIVIAL_DESTRUCTOR (type1))); && TYPE_HAS_TRIVIAL_DESTRUCTOR (type1)));
......
2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36855
* g++.dg/ext/has_trivial_destructor.C: Rename to...
* g++.dg/ext/has_trivial_destructor-1.C: ... this.
* g++.dg/ext/has_trivial_destructor-2.C: New.
2008-07-17 Paolo Bonzini <bonzini@gnu.org> 2008-07-17 Paolo Bonzini <bonzini@gnu.org>
PR rtl-optimization/36753 PR rtl-optimization/36753
......
// PR c++/36855
typedef char assert_0 [__has_trivial_destructor (int&) ? 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