rsmith added inline comments.
================ Comment at: cfe/trunk/lib/Sema/SemaType.cpp:2067 + S.LangOpts.GNUMode || + S.LangOpts.OpenCL).isInvalid(); } ---------------- This looks wrong to me. The OpenCL rules don't permit arbitrary constant folding in array bounds. If OpenCL intends to permit reading from const globals of integral types in constant expressions (as C++ does but C does not), then the right way to handle that would be to change `CheckICE` to permit such cases, as it does in C++ mode, not to enable arbitrary constant folding in array bounds. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D20090/new/ https://reviews.llvm.org/D20090 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits