AaronBallman wrote:

> However, it "breaks" compound literal C++ extension:
> 
> ```
> $ build/bin/clang++ -fsyntax-only test.cxx 
> test.cxx:12:2: error: array prvalue is not permitted
>    12 |         *((int []){ 1, 2, 3});
>       |         ^~~~~~~~~~~~~~~~~~~~~
> test.cxx:13:23: error: array prvalue is not permitted
>    13 |         ((int []){ 1, 2, 3}) + 0;
>       |         ~~~~~~~~~~~~~~~~~~~~ ^
> 2 errors generated.
> ```

That probably should continue to work -- we accept it today and so does GCC. 
It's a bit of an oddity, to be sure. But I don't see why it should be rejected 
either.


https://github.com/llvm/llvm-project/pull/140702
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to