re PR c++/53166 (static_assert produces bogus warning)
commitfb4bcc8d659011362117716d831829adaa02bdf3
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 4 May 2012 15:02:05 +0000 (4 15:02 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 4 May 2012 15:02:05 +0000 (4 15:02 +0000)
tree46a83e6c2ea8ac15132e01ee6c536631015b7c54
parent33e337e34d69a2e298be8b6c109b601c2986339b
re PR c++/53166 (static_assert produces bogus warning)

/cp
2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/53166
* pt.c (instantiate_class_template_1): Increase / decrease
c_inhibit_evaluation_warnings around the tsubst_expr call
for STATIC_ASSERT_CONDITION.
(tsubst_expr, case STATIC_ASSERT): Likewise.
* typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
c_inhibit_evaluation_warnings in the OPT_Waddress warnings.

/testsuite
2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/53166
* g++.dg/cpp0x/static_assert7.C: New.

From-SVN: r187165
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/static_assert7.C [new file with mode: 0644]