re PR c++/77496 (ICE in instantiate_type, at cp/class.c:8270)
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 12 Sep 2016 20:18:16 +0000 (20:18 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Mon, 12 Sep 2016 20:18:16 +0000 (20:18 +0000)
commit54dcdb88954b1192b004f8b91fc17a42765c20eb
tree06828e718304e9c4c4e9aa0de02496b72d3bff1b
parenta313485bbdcdee77b1bf891823f9da8984d76bcc
re PR c++/77496 (ICE in instantiate_type, at cp/class.c:8270)

gcc/c-family:
2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c++/77496
        * c-common.c (warn_for_omitted_condop): Also warn for boolean data.

gcc/c:
2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c++/77496
        * c-parser.c (c_parser_conditional_expression): Pass the rightmost
        COMPOUND_EXPR to warn_for_omitted_condop.

gcc/cp:
2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c++/77496
        * call.c (build_conditional_expr_1): Call warn_for_omitted_condop.
        * class.c (instantiate_type): Look through the SAVE_EXPR.

gcc/testsuite:
2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c++/77496
        * c-c++-common/warn-ommitted-condop.c: Add more test cases.
        * g++.dg/ext/pr77496.C: New test.
        * g++.dg/warn/pr77496.C: New test.

From-SVN: r240098
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/warn-ommitted-condop.c
gcc/testsuite/g++.dg/ext/pr77496.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/pr77496.C [new file with mode: 0644]