Re: [Patch] OpenMP: Improve map-clause error message for array function parameter (PR96678)

2020-08-25 Thread Jakub Jelinek via Gcc-patches
On Tue, Aug 25, 2020 at 05:33:08PM +0200, Tobias Burnus wrote: > Improve the error message. Currently code like: > > void test (double src[100]) > { > #pragma omp target map(alloc:src[:]) > > fails with the surprising > "for pointer type length expression must be specified" > as "double

[Patch] OpenMP: Improve map-clause error message for array function parameter (PR96678)

2020-08-25 Thread Tobias Burnus
Improve the error message. Currently code like: void test (double src[100]) { #pragma omp target map(alloc:src[:]) fails with the surprising "for pointer type length expression must be specified" as "double src[100]" is regarded as "double *src". Thus, one cannot simply extract the "100"