Menu ▾ ▴

#516 Compiler ignores next line after comment line ends with \

2.0 Series
closed-fixed
Scripting (211)
2
2007-01-24
2006-09-07
Anonymous
No

nsis 2.18, 2.19

sample code:

; comment line that ends with \
MessageBox MB_OK "ONE"
MessageBox MB_OK "TWO"

Only the second MessageBox is compiled.

For me this is a little bug. I spent few minutes
thinking about one warning :-)

Discussion

  • Amir Szekely

    Amir Szekely - 2006-09-09

    Logged In: YES
    user_id=584402

    Lines ending with backslashes are appended with the next
    line and processed together. That includes comments. I've
    added a few lines about it to the documentation.

     
  • Amir Szekely

    Amir Szekely - 2006-09-09
    • labels: 732400 --> Scripting
    • priority: 5 --> 2
     
  • Nobody/Anonymous

    Logged In: NO

    this is how the C/C++ preprocessors work.
    people with background in these languages shouldn't find it
    unusual, but this behaviour should be speciffied in the
    documentation

     
  • Amir Szekely

    Amir Szekely - 2007-01-24
    • status: open --> closed-fixed
     
  • Amir Szekely

    Amir Szekely - 2007-01-24

    Logged In: YES
    user_id=584402
    Originator: NO

    I've made the compiler spit out a warning in these cases. As said, this is the expected behavior, so this is the next best thing. gcc and cl do the same.

     

Log in to post a comment.