[02/12] OpenMP/C: Change repetitive allocator clause diagnostic wording
Commit Message
This is specifically for an allocator clause in an allocate directive.
The old text, 'allocator' clause allocator expression, does not flow very
well. This patch removes the redundant second allocator from the diagnostic.
This case reads poorly because the two words are the same, but there are
other diagnostics that use the same pattern that we could consider changing
as well. For example, 'allocate' clause allocator expression, despite being
two different words still feels rather redundant.
gcc/c/ChangeLog:
* c-parser.cc (c_parser_omp_allocate): Change diagnostic.
gcc/testsuite/ChangeLog:
* c-c++-common/gomp/allocate-5.c: Match new diagnostic.
Signed-off-by: Waffl3x <waffl3x@baylibre.com>
---
gcc/c/c-parser.cc | 2 +-
gcc/testsuite/c-c++-common/gomp/allocate-5.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -23488,7 +23488,7 @@ c_parser_omp_allocate (c_parser *parser)
!= get_identifier ("omp_allocator_handle_t"))
{
error_at (expr_loc,
- "%<allocator%> clause allocator expression has type "
+ "%<allocator%> clause expression has type "
"%qT rather than %<omp_allocator_handle_t%>",
TREE_TYPE (allocator));
allocator = NULL_TREE;
@@ -40,7 +40,7 @@ bar ()
#pragma omp allocate(a) foo(my_allocator) /* { dg-error "expected 'allocator'" } */
/* { dg-error "expected end of line before '\\(' token" "" { target *-*-* } .-1 } */
/* { dg-message "sorry, unimplemented: '#pragma omp allocate' not yet supported" "" { target c++ } .-2 } */
-#pragma omp allocate(a2) allocator(b) /* { dg-error "'allocator' clause allocator expression has type 'int' rather than 'omp_allocator_handle_t'" "todo: cp/semantics.c" { xfail c++ } } */
+#pragma omp allocate(a2) allocator(b) /* { dg-error "'allocator' clause expression has type 'int' rather than 'omp_allocator_handle_t'" "todo: cp/semantics.c" { xfail c++ } } */
/* { dg-message "sorry, unimplemented: '#pragma omp allocate' not yet supported" "" { target c++ } .-1 } */
}