public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51454] New: For loop improper scoping
@ 2011-12-07 17:54 pubby.8 at gmail dot com
  2011-12-07 19:19 ` [Bug c++/51454] " paolo.carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pubby.8 at gmail dot com @ 2011-12-07 17:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51454

             Bug #: 51454
           Summary: For loop improper scoping
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pubby.8@gmail.com


gcc version 4.7.0 20111203 (experimental) (GCC) 

This worked on 4.6, but isn't on 4.7:

for(float x = 0.0f; int x = 0;); 

error: redeclaration of ‘int x’
error: ‘float x’ previously declared here

It should be equivalent to this which compiles correctly:

{
  float x = 0.0f;
  while (int x = 0) { ; }
}


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

end of thread, other threads:[~2011-12-07 23:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-07 17:54 [Bug c++/51454] New: For loop improper scoping pubby.8 at gmail dot com
2011-12-07 19:19 ` [Bug c++/51454] " paolo.carlini at oracle dot com
2011-12-07 22:37 ` pubby.8 at gmail dot com
2011-12-07 23:29 ` paolo.carlini at oracle dot com

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).