Waffl3x wrote:
The old text, 'allocator' clause allocator expression, does not flow very
well. This patch removes the redundant second allocator from the diagnostic.

That's

  allocator( allocator )

Technically, it is not redundant as the argument to the 'allocator'
directive is called 'allocator' - but I concur that it is as clear
and more readable when dropping the second allocator.

* * *

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.

Here, one has to be a bit more careful. The 'allocate' clause is:

  allocate( allocator : variable-list-items )
or
  allocate( allocator(allocator), align(alignment) : variable-list-items)

And we talk explicitly about the allocator here – not about the
alignment nor about items in the variable list.

* * *

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.

LGTM.

Tobias

Reply via email to