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]

[Bug c++/54807] New: Names declared in a for's for-init-statement and condition should be in the same declarative region


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

             Bug #: 54807
           Summary: Names declared in a for's for-init-statement and
                    condition should be in the same declarative region
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ulfalizer@gmail.com


for (int i; int i = 0;) should give an error but currently doesn't.

14882:2003 6.5.3.1: "...except that names declared in the for-init-statement
are in the same declarative-region as those declared in the condition".


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