This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/8184: undefined variable gcc3.0
- From: riteshg at pune dot tcs dot co dot in
- To: gcc-gnats at gcc dot gnu dot org
- Date: 10 Oct 2002 11:50:39 -0000
- Subject: c++/8184: undefined variable gcc3.0
- Reply-to: riteshg at pune dot tcs dot co dot in
>Number: 8184
>Category: c++
>Synopsis: undefined variable gcc3.0
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 10 04:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Ritesh goel
>Release: 3.0
>Organization:
>Environment:
>Description:
gcc is allowing the usage of variable outside the scope of if stmt, if that variable is defined inside the condition expression of that if stmt and used as th first token after the scope of that if stmt .
as in eg.
void func()
{
if ( int i = 9)
{
//
}
i = 8;
}
this should be an error but gcc is allowing
i am using gcc3.0
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: