PR c++/82541
commit301c8f8fce4125a095df4316cd75f5fe2fdf2c7f
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jan 2018 17:05:14 +0000 (10 17:05 +0000)
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jan 2018 17:05:14 +0000 (10 17:05 +0000)
tree37f7d206934485b75f5cdcabfcc92b8619d89cbd
parent4b97404d90d20fe5dbb3659cf4ae9a71bc9ba728
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256441 138bc75d-0d04-0410-961f-82ee72b054a4
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]