#17 fix for bug 751703

closed-accepted
nobody
None
5
2004-05-14
2004-05-06
No

Hi all,

Bug 751703 is all about extern declared variables inside
a function being treated as local variables.

In SDCCicode.c around line 1537 (operandFromSymbol)
the extern keyword was forgotten to be checked and
the symbol was treated local afterwards. And that
resulted in the code being optimized away.

Greetings,
Maarten

Discussion

  • Maarten Brock

    Maarten Brock - 2004-05-06

    Bug fixed and untabified

     
  • Erik Petrich

    Erik Petrich - 2004-05-14
    • status: open --> closed-accepted
     
  • Erik Petrich

    Erik Petrich - 2004-05-14

    Logged In: YES
    user_id=635249

    Thanks for the fix.

    I adapted your change slightly by encapsulating your new
    !IS_EXTERN test along with some other existing tests inside
    a new test macro IS_AUTO and used it instead, since there
    are several places in the compiler that this combination of
    tests is useful.

    Erik

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks