hint directives not allowed for units
Original Reporter info from Mantis: kays @KaiBurghardt
-
Reporter name: Kai Burghardt
Original Reporter info from Mantis: kays @KaiBurghardt
- Reporter name: Kai Burghardt
Description:
As per documentation https://freepascal.org/docs-html/current/ref/refse5.html hint directives may follow a unit header. However, FPC does not accept it (anymore).
Steps to reproduce:
unit myUnit; deprecated;
interface
implementation
end.
yields a syntax error
Target OS: Linux for x86-64
Compiling myUnit.pas
myUnit.pas(2,24) Fatal: Syntax error, "INTERFACE" expected but "identifier DEPRECATED" found
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Additional information:
Putting {$modeSwitch hintDirective+} https://freepascal.org/docs-html/current/prog/progsu106.html before the hint, or even unit
does not have any effect. deprecated
is considered a syntax error nonetheless.
Mantis conversion info:
- Mantis ID: 38411
- OS: GNU/Linux
- OS Build: 4.4.0
- Build: 3.2.0+dfsg-7 [2020/08/21]
- Platform: x86_64
- Version: 3.2.0