Re: [sv-bc] Ambiguous declaration / initialization in for-loop

From: Steven Sharp <sharp_at_.....>
Date: Fri Oct 28 2005 - 13:35:27 PDT
I wrote earlier:

>There may still be a problem here.  What happens with
>
>	for (count = 0, int done = 0; !done; count++)

I have now looked at the BNF, and it appears that this is illegal
syntax.  There are separate productions for a list of initializers
and a list of declarations.  Only the second can have a data
type in it, and it must always start with one.

So it appears that there is no ambiguity here.

Steven Sharp
sharp@cadence.com
Received on Fri Oct 28 13:35:31 2005

This archive was generated by hypermail 2.1.8 : Fri Oct 28 2005 - 13:35:51 PDT