Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!ima!dirtydog!karl From: karl@ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Declaring array. Is this ok ? Message-ID: <1990Nov14.013549.14437@dirtydog.ima.isc.com> Date: 14 Nov 90 01:35:49 GMT References: Sender: news@dirtydog.ima.isc.com (NEWS ADMIN) Reply-To: karl@ima.isc.com (Karl Heuer) Organization: Interactive Systems Lines: 14 In article aps@tut.fi (Suntioinen Ari) writes: >Gcc seems to accept both. The default configuration of gcc includes several extensions over ANSI C. Use "gcc -ansi -pedantic" to test this sort of thing. $ cat try.c int foo(int n) { int a[n]; } $ gcc -c try.c $ gcc -ansi -pedantic -c try.c try.c: In function foo: try.c:1: warning: ANSI C forbids variable-size array `a' $ exit Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint