diff options
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/c-parser.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc index 678d914..7cc4d93c 100644 --- a/gcc/c/c-parser.cc +++ b/gcc/c/c-parser.cc @@ -22067,9 +22067,14 @@ c_parser_omp_declare_target (c_parser *parser) id = get_identifier ("omp declare target"); if (at2) { - error_at (OMP_CLAUSE_LOCATION (c), - "%qD specified both in declare target %<link%> and %<to%>" - " clauses", t); + if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_ENTER) + error_at (OMP_CLAUSE_LOCATION (c), + "%qD specified both in declare target %<link%> and %qs" + " clauses", t, OMP_CLAUSE_ENTER_TO (c) ? "to" : "enter"); + else + error_at (OMP_CLAUSE_LOCATION (c), + "%qD specified both in declare target %<link%> and " + "%<to%> or %<enter%> clauses", t); continue; } if (!at1) |