From 2d66eeeb56d642c1f080a580c5acadded1ff7816 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 1 Oct 2008 12:26:02 +0000 Subject: [PATCH] re PR c++/37683 (Revision 140780 caused g++.dg/warn/Wparentheses-3.C) 2008-09-30 H.J. Lu PR c++/37683 * parser.c (cp_parser_selection_statement): Fix uninitialized variable. From-SVN: r140810 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/parser.c | 1 + 2 files changed, 7 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0e8034307ca..2438bd6941e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2008-09-30 H.J. Lu + + PR c++/37683 + * parser.c (cp_parser_selection_statement): Fix uninitialized + variable. + 2008-09-30 Simon Martin PR c++/37555 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index c368a1c7f64..519c1d601d1 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -7163,6 +7163,7 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p) if (!cp_lexer_next_token_is_keyword (parser->lexer, RID_ELSE)) warning_at (loc, OPT_Wempty_body, "suggest braces around " "empty body in an % statement"); + nested_if = false; } else cp_parser_implicitly_scoped_statement (parser, &nested_if);