From: marxin Date: Tue, 31 Jul 2018 10:32:13 +0000 (+0000) Subject: Fix an UBSAN error in cp/parse.c (PR c++/86653). X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=396e3f01aef5739c9bb29531509b7029e907e3e2;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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263110 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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))