re PR c++/36870 (__has_nothrow_constructor violates the ODR)
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 21 Jul 2008 09:08:41 +0000 (09:08 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 21 Jul 2008 09:08:41 +0000 (09:08 +0000)
commite24313f349328c3fc973375cab9c3818388308ba
tree86d6438f19499a000e4686812d3cfedd05692dd2
parentc499b30003602aeb92a5619a5f2f2602ee09cbb8
re PR c++/36870 (__has_nothrow_constructor violates the ODR)

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

PR c++/36870
* semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
TYPE_NOTHROW_P, not TREE_NOTHROW.
(trait_expr_value): Likewise.

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

PR c++/36870
* g++.dg/ext/has_nothrow_assign_odr.C: New.
* g++.dg/ext/has_nothrow_copy_odr.C: Likewise.
* g++.dg/ext/has_nothrow_constructor_odr.C: Likewise.
* g++.dg/ext/has_nothrow_assign.C: Adjust.
* g++.dg/ext/has_nothrow_copy.C: Likewise.
* g++.dg/ext/has_nothrow_constructor.C: Likewise.

From-SVN: r138024
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/has_nothrow_assign.C
gcc/testsuite/g++.dg/ext/has_nothrow_assign_odr.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/has_nothrow_constructor.C
gcc/testsuite/g++.dg/ext/has_nothrow_constructor_odr.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/has_nothrow_copy.C
gcc/testsuite/g++.dg/ext/has_nothrow_copy_odr.C [new file with mode: 0644]