E
Erik de Castro Lopo
Hi all,
Consider the following code snippet:
do
{
int r = rand () ;
} while (r != 0) ;
It seems the compiler I'm using (GCC) does realise that the
scope of variable r extends the end of the while's conditional.
Questions:
- Is this correct according to the ISO/ANSI C standards?
- If so, can someone point me to the section of the ISO
C99 stanard whic defines this?
TIA,
Erik
Consider the following code snippet:
do
{
int r = rand () ;
} while (r != 0) ;
It seems the compiler I'm using (GCC) does realise that the
scope of variable r extends the end of the while's conditional.
Questions:
- Is this correct according to the ISO/ANSI C standards?
- If so, can someone point me to the section of the ISO
C99 stanard whic defines this?
TIA,
Erik