]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/37683 (Revision 140780 caused g++.dg/warn/Wparentheses-3.C)
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 1 Oct 2008 12:26:02 +0000 (12:26 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Wed, 1 Oct 2008 12:26:02 +0000 (12:26 +0000)
2008-09-30  H.J. Lu  <hongjiu.lu@intel.com>

PR c++/37683
* parser.c (cp_parser_selection_statement): Fix uninitialized
variable.

From-SVN: r140810

gcc/cp/ChangeLog
gcc/cp/parser.c

index 0e8034307ca9e0b105c209a388382b3ebcfeeb87..2438bd6941e5a7aaeb9c3f7af34948f50d890868 100644 (file)
@@ -1,3 +1,9 @@
+2008-09-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR c++/37683
+       * parser.c (cp_parser_selection_statement): Fix uninitialized
+       variable.
+
 2008-09-30  Simon Martin  <simartin@users.sourceforge.net>
 
        PR c++/37555
index c368a1c7f6454e4efaa6815adaeb71738cf3b162..519c1d601d1693796e948b9ba1de9927811a7501 100644 (file)
@@ -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 %<if%> statement");
+               nested_if = false;
              }
            else
              cp_parser_implicitly_scoped_statement (parser, &nested_if);