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

Close

#84 parser: Compiler silently fails on invalid INITIALIZE

GC 2.0
closed
Edward Hart
None
7
1 day ago
2014-06-20
Edward Hart
No

The compiler silently fails when INITIALIZE is used with literals. For example:

INITIALIZE "I'm a literal", 999

Related

Discussion: Introducing the ASSERT statement

Discussion

  • Edward Hart
    Edward Hart
    2014-06-20

    Attached is a patch to typeck.c which fixes the bug and a patch to the test suite to detect it.

     
  • Simon Sobisch
    Simon Sobisch
    1 day ago

    Sorry for the late reply. Not sure how you recognized this issue...

    The patch was quite correct; cb_error_x needs the statement tree CB_TREE (current_statement) instead of the variable key CB_TREE (l), if not you'd get the wrong line numbers. Changed this and the test suite entry a little bit, added a
    Changelog entry and committed it with [r572]

    Thank you for reporting and fixing this.

    Simon

     

    Related

    Commit: [r572]

  • Simon Sobisch
    Simon Sobisch
    1 day ago

    • status: open --> closed
    • assigned_to: Edward Hart
    • Group: unclassified --> GC 2.0
    • Priority: 1 --> 7