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

From: Paul Graham <pgraham_at_.....>
Date: Fri Oct 28 2005 - 13:45:00 PDT
> There may still be a problem here.  What happens with
> 
> 	for (count = 0, int done = 0; !done; count++)
> 	
> The rule about "all or none" means that the declaration of done requires

I think I made a suggestion a while back that SV should
match the C++ syntax (or at least the g++ implementation)
which allows a optional type declaration immediately after
the '('.  So 

    for (count = 0, done = 0; ...

and

    for (int count = 0, done = 0; ...

are both legal, but 

    for (count = 0, int done = 0; ...

is not.  Does the SV syntax allow this last example?

Paul
Received on Fri Oct 28 13:45:09 2005

This archive was generated by hypermail 2.1.8 : Fri Oct 28 2005 - 13:45:54 PDT