public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8184: undefined variable gcc3.0
@ 2002-10-10  6:16 Ritesh Goel
  0 siblings, 0 replies; 3+ messages in thread
From: Ritesh Goel @ 2002-10-10  6:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c++/8184: undefined variable gcc3.0
@ 2002-10-10  5:11 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-10-10  5:11 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, riteshg

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&pr=8184


^ permalink raw reply	[flat|nested] 3+ messages in thread

* c++/8184: undefined variable gcc3.0
@ 2002-10-10  4:56 riteshg
  0 siblings, 0 replies; 3+ messages in thread
From: riteshg @ 2002-10-10  4:56 UTC (permalink / raw)
  To: gcc-gnats


>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:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-10 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10  6:16 c++/8184: undefined variable gcc3.0 Ritesh Goel
  -- strict thread matches above, loose matches on Subject: below --
2002-10-10  5:11 nathan
2002-10-10  4:56 riteshg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).