Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1739 Variables escape from their scope

closed-fixed
Erik Petrich
5
2013-05-25
2011-01-08
Christopher Head
No

The attached file compiles. It shouldn't, because the variable "i" should be out of scope where it's used. Interestingly, removing either the "if" or the "while" around the "for" causes the proper error to appear!

Discussion

  • The failing source

     
    Attachments
  • This could be related to bug #3190029, where the opposite problem occours: A local variable being visible only in part of it's scope.

     
  • Maarten Brock
    Maarten Brock
    2011-10-31

    • labels: 608414 --> C-Front End
     
  • Erik Petrich
    Erik Petrich
    2012-02-19

    Fixed in 3.1.2 #7331

     
  • Erik Petrich
    Erik Petrich
    2012-02-19

    • milestone: --> fixed
    • assigned_to: nobody --> epetrich
    • status: open --> closed-fixed