c99 VLA semantics
Mark Mitchell
mark@codesourcery.com
Fri Jun 16 22:34:00 GMT 2006
Joseph S. Myers wrote:
>> My fingers found the send button instead of the attach button, sorry about
>> that.
>
> As a patch to tree.c, I can't approve this; the question would be whether
> other languages want something different.
I intended variably_modified_type_p to be exactly what is required for
GNU C, when presented with types that can occur in GNU C.
So, if you believe that variably-modified arguments should not make a
function type be variably-modified, then Mike's change is correct.
However, cp/pt.c:check_instantiated_args wants the current definition;
we don't want to try to instantiate a template with an argument of "void
(*)(int (*)][foo()]". I think Mike's patch would have to include an
audit of all existing uses of the predicate, many of which are
presumably checking that "there are no VLAs anywhere in here".
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Gcc-patches
mailing list