Using initializer without a cast?

Bostjan Mihoric ccompletion@gmail.com
Tue Apr 10 15:26:00 GMT 2018


On 4/10/18, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>>
>> Is there a way of doing initializers in second group without doing a
>> cast?
>
> Only in C++. The C standard defines a compound literal as (type-name){
> initializer-list }. If you don't have the type-name then it's not a
> compound literal.
>

Thanks. Do you see any chance of this becoming a GNU extension? It
would make sense to you?

Regards,
BM



More information about the Gcc-help mailing list