[cfe-dev] Can't use sizeof ( typeof ( <vla> ))

Paulo Matos via cfe-dev cfe-dev at lists.llvm.org
Thu Nov 17 10:06:43 PST 2016



On 17/11/16 19:04, Joerg Sonnenberger via cfe-dev wrote:
> On Thu, Nov 17, 2016 at 04:02:53PM +0100, Paulo Matos via cfe-dev wrote:
>> Clang seems to be happy with most simple vla but then it crashes with:
>>
>> int
>> f1 (int i)
>> {
>>   char a[i];
>>   return sizeof (typeof (a));
>> }
> 
> Works fine with clang 3.8.1 here?
> 

I assume you didn't build with assertions on (debug build).

-- 
Paulo Matos



More information about the cfe-dev mailing list