This is the mail archive of the gcc@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: gimple question


On Mon, 12 Jul 2004, Razya Ladelsky wrote:

> Hello,
> 
> For the following function :
> 
> int foo (int i, int array[i++])
> {
>     return i;
> }
> 
> I can't find the explicit increment of i (appearing in the second 
> parameter) in the gimple tree.
> This information is preserved somewhere, as after rtl expansion, it 
> appears 
> explicitly in the body of the method.
> 
> Could someone point me where to look for this info?

Try the pending_sizes list.  That this works at all must be somewhat by
chance, as we certainly don't claim to implement C99 VLAs.  (My reading of
the standard is that this increment *is* required to be executed, as a
type being variably modified is a property of the declarator so while the
type of array is "int *" it still counts as variably modified so the size
expression must be executed on entry to the function.)

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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