re PR c++/80119 (-Wmaybe-uninitialized wrongly flags the body of a short-circuited...
authorMarek Polacek <polacek@redhat.com>
Fri, 24 Mar 2017 14:22:01 +0000 (14:22 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 24 Mar 2017 14:22:01 +0000 (14:22 +0000)
commitc8b1fbc12a6a7249f93a985c697c8e0edeb2a6d5
tree6caa8c557ab5e1f209071118cf27e555e03ae7df
parentc4d5ab5d0979227a780fb74a2961205e0458d91e
re PR c++/80119 (-Wmaybe-uninitialized wrongly flags the body of a short-circuited if-clause)

PR c++/80119
* cp-gimplify.c (cp_fold): Strip CLEANUP_POINT_EXPR if the expression
doesn't have side effects.

* g++.dg/warn/Wuninitialized-9.C: New test.

From-SVN: r246461
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wuninitialized-9.C [new file with mode: 0644]