Compound literals were never formally added to C++.<p>Still, that hasn&#x27;t stopped various front-ends (including GCC and Clang) from adding them to their C++ dialects.  My code compiles with Clang, but not GCC.  GCC complains that it&#x27;s not OK to take the address of the array compound literal.<p>FWIW, C99 makes it clear that the object has automatic storage duration lasting until the end of the enclosing block.  i.e. There shouldn&#x27;t be an issue with dangling pointers.