From: Martin Liska Date: Tue, 31 Jul 2018 10:32:13 +0000 (+0200) Subject: Fix an UBSAN error in cp/parse.c (PR c++/86653). X-Git-Tag: basepoints/gcc-10~5063 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dbc3940fcd15ff477eb556630734017dd2b0cff;p=thirdparty%2Fgcc.git Fix an UBSAN error in cp/parse.c (PR c++/86653). 2018-07-31 Martin Liska PR c++/86653 * parser.c (cp_parser_condition): Initialize non_constant_p to false. From-SVN: r263110 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d3b3cc2be6c2..128360794e8b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2018-07-31 Martin Liska + + PR c++/86653 + * parser.c (cp_parser_condition): Initialize non_constant_p + to false. + 2018-07-28 David Malcolm * error.c (cp_printer): In the leading comment, move "%H" and "%I" diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index d44a6b880288..93c812f80d73 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -11721,7 +11721,7 @@ cp_parser_condition (cp_parser* parser) if (cp_parser_parse_definitely (parser)) { tree pushed_scope; - bool non_constant_p; + bool non_constant_p = false; int flags = LOOKUP_ONLYCONVERTING; if (!cp_parser_check_condition_declarator (parser, declarator, loc))