Re: sizeof(array) with variable-length array parameter

2008-04-09 Thread peter . kourzanov
On Wed, Apr 09, 2008 at 01:22:15PM +0100, Andrew Haley wrote: > [EMAIL PROTECTED] wrote: > > Dear gcc users and developers, > > > > This might be a stupid question, nevertheless... > > > > I've been wondering for a long time, why the behaviour of > > variable-length arrays w.r.t. the sizeof

Re: sizeof(array) with variable-length array parameter

2008-04-09 Thread Andrew Haley
[EMAIL PROTECTED] wrote: > Dear gcc users and developers, > > This might be a stupid question, nevertheless... > > I've been wondering for a long time, why the behaviour of > variable-length arrays w.r.t. the sizeof operator is different > for local/auto variables and for function arguments

sizeof(array) with variable-length array parameter

2008-04-09 Thread peter . kourzanov
Dear gcc users and developers, This might be a stupid question, nevertheless... I've been wondering for a long time, why the behaviour of variable-length arrays w.r.t. the sizeof operator is different for local/auto variables and for function arguments (in C99): #include void foo(int s, in