Commit a28351e7 by Jakub Jelinek Committed by Jakub Jelinek

re PR c/91192 (non-deterministic ICE on invalid)

	PR c/91192
	* c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
	even if finish is UNKNOWN_LOCATION, just use start as finish in that
	case.

From-SVN: r273935
parent 2153fa7b
2019-07-31 Jakub Jelinek <jakub@redhat.com>
PR c/91192
* c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
even if finish is UNKNOWN_LOCATION, just use start as finish in that
case.
2019-07-25 Martin Liska <mliska@suse.cz> 2019-07-25 Martin Liska <mliska@suse.cz>
Dominik Infuhr <dominik.infuehr@theobroma-systems.com> Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
......
...@@ -7477,8 +7477,9 @@ c_parser_sizeof_expression (c_parser *parser) ...@@ -7477,8 +7477,9 @@ c_parser_sizeof_expression (c_parser *parser)
error_at (expr_loc, "%<sizeof%> applied to a bit-field"); error_at (expr_loc, "%<sizeof%> applied to a bit-field");
result = c_expr_sizeof_expr (expr_loc, expr); result = c_expr_sizeof_expr (expr_loc, expr);
} }
if (finish != UNKNOWN_LOCATION) if (finish == UNKNOWN_LOCATION)
set_c_expr_source_range (&result, start, finish); finish = start;
set_c_expr_source_range (&result, start, finish);
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment