[PATCH] D26735: [OpenCL] Disable && (address of label) GNU extension for OpenCL
Anastasia Stulova via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 16 10:01:34 PST 2016
Anastasia added a comment.
It seems that this bit is accepted under -std=c99 and the warning is given with the -pedantic flag. I am not sure whether it adds much deviating the implementation from C here. The OpenCL spec doesn't seem to contain anything on this matter? But if we decide to be more strict, could we try to keep it consistent with the C implementation (perhaps we could give the same diagnostic as C does as an error instead or a warning).
Also this bit gives different error in C:
int a;
void *p = &&a;
error: use of undeclared label 'a'
It doesn't seem like any of the errors for that code is more logical or precise. But if I would have to pick among equivalent approaches I would go for keeping it coherent with C.
https://reviews.llvm.org/D26735
More information about the cfe-commits
mailing list