u mean gcc doesn't comply to those standards?? anyway is the behavior undefined?? but as it seems, these work OK... did u notice the *nice* output gcc gives?
--- In [email protected], "peternilsson42" <[EMAIL PROTECTED]> wrote: > > "Indika Bandara" <indikabandara19@> 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 >
