re PR c++/82541 (Wduplicated-branches triggers in template context)
authorMarek Polacek <polacek@redhat.com>
Wed, 10 Jan 2018 17:05:14 +0000 (17:05 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 10 Jan 2018 17:05:14 +0000 (17:05 +0000)
commit6bebae75035889a4844eb4d32a695bebf412bcd7
tree37f7d206934485b75f5cdcabfcc92b8619d89cbd
parente99ef40892b598eeb3fa496cc472e111675d7f6c
re PR c++/82541 (Wduplicated-branches triggers in template context)

PR c++/82541
* call.c (build_conditional_expr_1): Check complain before warning.
* pt.c (tsubst_copy_and_build) <case COND_EXPR>: Suppress
-Wduplicated-branches.

* g++.dg/warn/Wduplicated-branches4.C: New test.

From-SVN: r256441
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wduplicated-branches4.C [new file with mode: 0644]