On 09/26/2018 12:50 PM, Joseph Myers wrote:
> On Wed, 26 Sep 2018, Cesar Philippidis wrote:
> 
>> Attached is an old patch which updated the C and C++ FEs to use %<)%>
>> for the right ')' symbol. It's mostly a cosmetic change. All of the
>> changes are self-contained to the OpenACC code path.
> 
> Why is the "before ')'" included in the call to c_parser_error at all?  
> c_parser_error calls c_parse_error which adds its own " before " and token 
> description or expansion, so I'd expect the current error to result in a 
> message ending in something of the form "before X before Y".

On closer inspection

 #pragma acc parallel copyin (a[0:N]) copy (b[0:N]) wait (1 /* {
dg-error "expected '\\\)' before end of line" } */
-    /* { dg-error "expected integer expression before '\\\)'" "" {
target c++ } .-1 } */
+    /* { dg-error "expected integer expression list before" "" { target
c++ } .-1 } */

so this is only applicable to c++. But in C++ I see duplicate errors
like this

wait.c:29:29: error: expected ‘)’ before end of line
 #pragma acc parallel wait (1
                           ~ ^
                             )
wait.c:29:29: error: expected integer expression list before ‘)’ before
end of line

I suppose for C++ that's an improvement over

wait.c:29:29: error: expected integer expression before ')' before end
of line

Julian, I need to start working on deep copy in OpenACC. Can you take
over this patch? The error handling code in the C FE needs to be removed
because it's dead.

Thanks,
Cesar

Reply via email to