Hello. Quite simple patch that initializes a boolean value before it's used. The variable is not initialized when an error recovery happens.
Ready for trunk after testing? Thanks, Martin gcc/cp/ChangeLog: 2018-07-26 Martin Liska <mli...@suse.cz> PR c++/86653 * parser.c (cp_parser_condition): Initialize non_constant_p to false. --- gcc/cp/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index d44a6b88028..93c812f80d7 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))