This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/8184: undefined variable gcc3.0


Thanx for ur immediate response , i really appreciate that .
Is by [6.4]/3 ur mean is ISO standards 6.4 point 3 .
I checked the ISO standards 6.4 point 3 . It is a saying that variable is in
scope from its point of declaration until the end of substatements
controlled by the condition .
but in particular example
if ( int i == 5)
{
}
i = 9 ;
here "i"  is not in scope of if statement . and also if u try to assign i to
some other variable there it says error .

int j ; if ( int i == 6) {}  j = i;

i am in doubt regarding this ,
plzz clarify it .

thanx and regards
ritesh


----- Original Message -----
From: <nathan@gcc.gnu.org>
To: <gcc-bugs@gcc.gnu.org>; <gcc-prs@gcc.gnu.org>; <nobody@gcc.gnu.org>;
<riteshg@pune.tcs.co.in>
Sent: Thursday, October 10, 2002 5:41 PM
Subject: Re: c++/8184: undefined variable gcc3.0


> Synopsis: undefined variable gcc3.0
>
> State-Changed-From-To: open->closed
> State-Changed-By: nathan
> State-Changed-When: Thu Oct 10 05:11:55 2002
> State-Changed-Why:
>     not a bug. [6.4]/3 allows this strange behaviour
>
>
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
r=8184


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]