summaryrefslogtreecommitdiff
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, 4 insertions, 7 deletions
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index d08d1d0bcf1..fb3b01cd4a2 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -775,8 +775,7 @@ c_parser_consume_pragma (c_parser *parser)
parser->in_pragma = true;
}
-/* Update the globals input_location and in_system_header from
- TOKEN. */
+/* Update the global input_location from TOKEN. */
static inline void
c_parser_set_source_position_from_token (c_token *token)
{
@@ -6301,7 +6300,7 @@ c_parser_unary_expression (c_parser *parser)
ret.value = build_indirect_ref (op_loc, op.value, RO_UNARY_STAR);
return ret;
case CPP_PLUS:
- if (!c_dialect_objc () && !in_system_header)
+ if (!c_dialect_objc () && !in_system_header_at (input_location))
warning_at (op_loc,
OPT_Wtraditional,
"traditional C rejects the unary plus operator");
@@ -12530,10 +12529,10 @@ c_parser_omp_target (c_parser *parser, enum pragma_context context)
"parallel for simd")];
c_parser_consume_token (parser);
+ strcpy (p_name, "#pragma omp target");
if (!flag_openmp) /* flag_openmp_simd */
return c_parser_omp_teams (loc, parser, p_name,
OMP_TARGET_CLAUSE_MASK, cclauses);
- strcpy (p_name, "#pragma omp target");
keep_next_level ();
tree block = c_begin_compound_stmt (true);
tree ret = c_parser_omp_teams (loc, parser, p_name,
@@ -13567,10 +13566,8 @@ c_parser_cilk_all_clauses (c_parser *parser)
loops. */
static void
-c_parser_cilk_simd (c_parser *parser ATTRIBUTE_UNUSED)
+c_parser_cilk_simd (c_parser *parser)
{
- char p_name[100];
- strcpy (p_name, "#pragma omp");
tree clauses = c_parser_cilk_all_clauses (parser);
tree block = c_begin_compound_stmt (true);
location_t loc = c_parser_peek_token (parser)->location;