aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c/c-parser.c')
-rw-r--r--gcc/c/c-parser.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 44a925b..0259f66 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -4729,7 +4729,8 @@ c_parser_compound_statement_nostart (c_parser *parser)
syntactically. This ensures that the user doesn't put them
places that would turn into syntax errors if the directive
were ignored. */
- if (c_parser_pragma (parser, pragma_compound))
+ if (c_parser_pragma (parser,
+ last_label ? pragma_stmt : pragma_compound))
last_label = false, last_stmt = true;
}
else if (c_parser_next_token_is (parser, CPP_EOF))
@@ -14988,7 +14989,7 @@ c_parser_omp_ordered (c_parser *parser, enum pragma_context context)
error_at (loc,
"%<#pragma omp ordered%> with %<depend> clause may "
"only be used in compound statements");
- c_parser_skip_to_pragma_eol (parser);
+ c_parser_skip_to_pragma_eol (parser, false);
return false;
}
@@ -15636,7 +15637,7 @@ c_parser_omp_target_update (location_t loc, c_parser *parser,
error_at (loc,
"%<#pragma omp target update%> may only be "
"used in compound statements");
- c_parser_skip_to_pragma_eol (parser);
+ c_parser_skip_to_pragma_eol (parser, false);
return false;
}
@@ -15696,7 +15697,7 @@ c_parser_omp_target_enter_data (location_t loc, c_parser *parser,
error_at (loc,
"%<#pragma omp target enter data%> may only be "
"used in compound statements");
- c_parser_skip_to_pragma_eol (parser);
+ c_parser_skip_to_pragma_eol (parser, false);
return NULL_TREE;
}
@@ -15781,7 +15782,7 @@ c_parser_omp_target_exit_data (location_t loc, c_parser *parser,
error_at (loc,
"%<#pragma omp target exit data%> may only be "
"used in compound statements");
- c_parser_skip_to_pragma_eol (parser);
+ c_parser_skip_to_pragma_eol (parser, false);
return NULL_TREE;
}