From b1c95bb595d159b769409063df40414b9c830009 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 13 Jan 2017 12:55:12 +0000 Subject: [PATCH] gimple-parser.c (c_parser_gimple_compound_statement): Handle nops. 2017-01-13 Richard Biener * gimple-parser.c (c_parser_gimple_compound_statement): Handle nops. From-SVN: r244434 --- gcc/c/ChangeLog | 5 +++++ gcc/c/gimple-parser.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index fd6f74b3b41..5b590b33b8b 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,8 @@ +2017-01-13 Richard Biener + + * gimple-parser.c (c_parser_gimple_compound_statement): Handle + nops. + 2017-01-13 Richard Biener * gimple-parser.c (c_parser_gimple_postfix_expression): Parse diff --git a/gcc/c/gimple-parser.c b/gcc/c/gimple-parser.c index 927c68545cf..df11e506d51 100644 --- a/gcc/c/gimple-parser.c +++ b/gcc/c/gimple-parser.c @@ -211,6 +211,17 @@ c_parser_gimple_compound_statement (c_parser *parser, gimple_seq *seq) } goto expr_stmt; + case CPP_SEMICOLON: + { + /* Empty stmt. */ + location_t loc = c_parser_peek_token (parser)->location; + c_parser_consume_token (parser); + gimple *nop = gimple_build_nop (); + gimple_set_location (nop, loc); + gimple_seq_add_stmt (seq, nop); + break; + } + default: expr_stmt: c_parser_gimple_statement (parser, seq); -- 2.30.2