gimple-parser.c (c_parser_gimple_compound_statement): Handle nops.
authorRichard Biener <rguenther@suse.de>
Fri, 13 Jan 2017 12:55:12 +0000 (12:55 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 13 Jan 2017 12:55:12 +0000 (12:55 +0000)
2017-01-13  Richard Biener  <rguenther@suse.de>

* gimple-parser.c (c_parser_gimple_compound_statement): Handle
nops.

From-SVN: r244434

gcc/c/ChangeLog
gcc/c/gimple-parser.c

index fd6f74b3b4136a57795d64cd2fd9db7aa11846d0..5b590b33b8ba30a36932f62bc1a718daa124a6c2 100644 (file)
@@ -1,3 +1,8 @@
+2017-01-13  Richard Biener  <rguenther@suse.de>
+
+       * gimple-parser.c (c_parser_gimple_compound_statement): Handle
+       nops.
+
 2017-01-13  Richard Biener  <rguenther@suse.de>
 
        * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
index 927c68545cf31e3464b0b6e6d3e323dcb748aee7..df11e506d512aab48145097834b7a7345de45cd1 100644 (file)
@@ -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);