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

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Thu Nov 17 10:11:21 PST 2016


On Thu, Nov 17, 2016 at 07:06:43PM +0100, Paulo Matos via cfe-dev wrote:
> 
> 
> 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).

Yeah sorry, that was not my usual clang binary :)

Joerg



More information about the cfe-dev mailing list