IFDEF + numeric identifier is always TRUE in IDE
Original Reporter info from Mantis: tintinux
-
Reporter name:
Original Reporter info from Mantis: tintinux
- Reporter name:
Description:
Hi
When we test a compilation directive identifier containing only digits, the result is always TRUE.
The code between {IFDEF 999} and {
ENDIF} or {IFNDEF 999} and {$ENDIF} is always appearing as active.
Thanks !
Steps to reproduce:
program Project1;
{$mode objfpc}{$H+}
begin
{$IFDEF 2017}
writeln ( 'in 2017' ); // visible
{$ENDIF}
{$IFNDEF 2017}
writeln ( 'not in 2017' ); // visible
{$ENDIF}
{$IFDEF Y2017}
writeln ( 'in Y2017' ); // disabled
{$ENDIF}
{$IFNDEF Y2017}
writeln ( 'not in Y2017' ); // visible
{$ENDIF}
end.
Additional information:
The issue is only for display in EDI.
The compilation is OK and takes care correctly of the test.
Mantis conversion info:
- Mantis ID: 30214
- OS: Any
- OS Build: Any
- Platform: Any
- Version: 1.6
- Monitored by: » tintinux (tintinux)