fcl-passrc fails when you use some characters in an inactive code part
Original Reporter info from Mantis: Michalis @michaliskambi
-
Reporter name: Michalis Kamburelis
Original Reporter info from Mantis: Michalis @michaliskambi
- Reporter name: Michalis Kamburelis
Description:
FPC ignores everything inside
{$ifdef NEVER_DEFINED}
...
{$endif}
if the "NEVER_DEFINED" is not defined.
fcl-passrc fails when the "..." part contains something really weird (not recognized by the tokenizer, it seems), like "}" or "|" or "ą" (local Polish letter -- "a" with a "tail").
It seems that fcl-passrc treats all such characters as an unexpected end of file.
$ fpc trying_to_scan_not_active_code.lpr
$ ./test_passrc trying_to_scan_not_active_code.lpr
An unhandled exception occurred at $0000000000477825:
EParserError: Syntax error at token "EOF" in file trying_to_scan_not_active_code.lpr at line 6 column 1
Mantis conversion info:
- Mantis ID: 30720
- OS: Debian GNU/Linux
- OS Build: (testing)
- Build: 34702
- Platform: x86-64
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 34879 (#5d4f605a)
- Target version: 3.2.0