{$ifopt R+} not always reliable
Original Reporter info from Mantis: Adriaan van Os
-
Reporter name: Adriaan van Os
Original Reporter info from Mantis: Adriaan van Os
- Reporter name: Adriaan van Os
Description:
{$ifopt R+} is not always reliable, e.g.
{$mode objfpc}
program TestLocal;
var i: longint;
begin
{$R+}
{$ifopt R+}
{$define local_RangeCheck}
{$R-}
{$endif}
i:= longword( -1);
{$ifdef local_RangeCheck}
{$R+}
{$endif}
end.
It looks like it depends on what is between {R+} and {
ifopt R+}. For example, adding a // comment and a {} comment give different results.
Additional information:
FPC trunk revision 9148 on i386-apple-darwin.
Mantis conversion info:
- Mantis ID: 10350
- Version: 2.3.1
- Fixed in version: 2.2.2
- Fixed in revision: 9453 (#2d4be27e)