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

Close

#49 Fix for showing message for missing "if" at end of peephole

closed-accepted
Maarten Brock
None
5
2005-12-07
2005-11-26
Hubert Sack
No

if the "if" at the end of a peep rule is missing, the
rule is still applied but a condition-function is not
invoked.
Happend with the changes done with patch 1144962,
fixed since 2005-11-20 by Frieder.
It's not an error of SDCC, but I think a message
should be generated.
This patch solves it by writing out the rule starting
with the line following "by {" and finally adds
that "} if ..." is expected there

Discussion

  • Hubert Sack
    Hubert Sack
    2005-11-26

    diff of the changes for the patch

     
    Attachments
  • Hubert Sack
    Hubert Sack
    2005-11-26

    • summary: Fix for sowing message for missing "if" at end of peephole --> Fix for showing message for missing "if" at end of peephole
     
  • Hubert Sack
    Hubert Sack
    2005-12-06

    Logged In: YES
    user_id=1160854

    I found a missing condition, resulting in a wrong error
    message.
    The line 'if (strcmp(bp, "replace", 7))' must be 'if (*bp
    && strcmp(bp, "replace", 7))'.
    Otherwise the message '} if ... expected' will be shown if
    there are one or more \n at the end of the peephole file
    (found at z80 port).

     
  • Maarten Brock
    Maarten Brock
    2005-12-07

    Logged In: YES
    user_id=888171

    Implemented in SDCC 2.5.4 #1182

     
  • Maarten Brock
    Maarten Brock
    2005-12-07

    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-accepted