This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80119] [6/7 Regression] -Wmaybe-uninitialized wrongly flags the body of a short-circuited if-clause
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Mar 2017 14:22:33 +0000
- Subject: [Bug c++/80119] [6/7 Regression] -Wmaybe-uninitialized wrongly flags the body of a short-circuited if-clause
- Auto-submitted: auto-generated
- References: <bug-80119-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80119
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Fri Mar 24 14:22:01 2017
New Revision: 246461
URL: https://gcc.gnu.org/viewcvs?rev=246461&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wuninitialized-9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/testsuite/ChangeLog