This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8184: undefined variable gcc3.0
- From: "Ritesh Goel" <riteshg at pune dot tcs dot co dot in>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 10 Oct 2002 13:16:04 -0000
- Subject: Re: c++/8184: undefined variable gcc3.0
- Reply-to: "Ritesh Goel" <riteshg at pune dot tcs dot co dot in>
The following reply was made to PR c++/8184; it has been noted by GNATS.
From: "Ritesh Goel" <riteshg@pune.tcs.co.in>
To: <nathan@gcc.gnu.org>,
<gcc-bugs@gcc.gnu.org>,
<gcc-prs@gcc.gnu.org>,
<nobody@gcc.gnu.org>,
<gcc-gnats@gcc.gnu.org>
Cc:
Subject: Re: c++/8184: undefined variable gcc3.0
Date: Fri, 8 Nov 2002 18:46:00 +0530
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