This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C99 parsing error?
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: Jamie Lokier <jamie at shareable dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: 18 May 2003 16:04:01 +0200
- Subject: Re: C99 parsing error?
- References: <20030518082723.GA6350@mail.jlokier.co.uk>
Jamie Lokier <jamie@shareable.org> writes:
> Is it really not permitted to write this in C99?:
>
> while (--length >= 0)
> {
> loop:
> int byte = *data++;
>
> GCC 3.2.2 reports: parse error before "int"
> If I replace "loop:" with "loop:;", it's fine.
That is indeed not permitted. C99 allows mixing statements and
declarations within blocks, but a declaration *is* not a statement,
and a label must be followed by a statement.
--
Falk