This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53166] static_assert produces bogus warning


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53166

--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-05-04 15:02:10 UTC ---
Author: paolo
Date: Fri May  4 15:02:05 2012
New Revision: 187165

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187165
Log:
/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.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/static_assert7.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]