From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4405FD26.6080607@lanl.gov> Date: Wed, 1 Mar 2006 12:59:34 -0700 From: Ronald G Minnich User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] A Plan 9 C request.... References: <59a908a62c52dd9ff6252fe697d37a87@coraid.com> In-Reply-To: <59a908a62c52dd9ff6252fe697d37a87@coraid.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 08fbfb58-ead1-11e9-9d60-3106f5b1d025 Brantley Coile wrote: >>now means >> >> { int i; for(i=3D0; i<10; i++); } >=20 >=20 > Does that mean the following will compile? >=20 > void > f(void) > { > i =3D 3; > put(i); > for (int i =3D 0; i < 3; i++) > put(i); > if (i =3D=3D 4) put(4); > } >=20 cat > t.c void f(void) { i =3D 3; put(i); for (int i =3D 0; i < 3; i++) put(i); if (i =3D=3D 4) put(4); } [rminnich@q tmp]$ cc t.c t.c: In function =91f=92: t.c:4: error: =91i=92 undeclared (first use in this function) t.c:4: error: (Each undeclared identifier is reported only once t.c:4: error: for each function it appears in.) t.c:6: error: =91for=92 loop initial declaration used outside C99 mode [rminnich@q tmp]$ ron