This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c99 VLA semantics


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]