Ted Kremenek wrote:-

> > is this valid:
> >
> > char[n*m] foo(int n, int m) { ... }
> > ...
> > a=sizeof(foo(x,y))
> > ?
> 
> This (I believe) is not valid, and I couldn't get gcc to compile  
> similar code.  From the standard: "All declarations of variably  
> modi?ed (VM) types have to be either block scope or function  
> prototype scope."

It's invalid for a different reason (and one clang doesn't
implement, ahem): the return type of a function declarator
cannot have array type.

Neil.
_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Reply via email to