"Indika Bandara" <[EMAIL PROTECTED]> wrote:
> > > func(int i)
> > > {
> > > char buf[i];
> > 
> > I don't see why they are not giving you compile errors
> > since the size of an array is supposed to be a const
> > or a literal, not a variable.
> 
> so u are saying in declaration of a array size should be a
> compile time constant?

For C90, the most common implementation of C, yes. C99 has
variable length arrays.

Note that most compilers are not 'conforming' in their
default modes. Note also that high warning levels do not
make your compiler more conforming.

-- 
Peter

Reply via email to