hint objc not used for {modeswitch objectivec}
Original Reporter info from Mantis: skalogryyz
-
Reporter name: Dmitry Boyarintsev
Original Reporter info from Mantis: skalogryyz
- Reporter name: Dmitry Boyarintsev
Description:
compiler gives a hint "unit not used" for objc and objcbase units, despite the compiler implicitly uses both of them for any unit with {$modeswitch objectivecX}
Steps to reproduce:
program test;
{$mode delphi}
{$modeswitch objectivec1}
uses CocoaAll, test2;
var
pool : NSAutoReleasePool;
begin
pool := NSAutoreleasePool.alloc.init;
writeln (initv);
pool.release;
end.
----
unit test2;
{$mode delphi}
{$modeswitch objectivec1}
interface
uses
CocoaAll;
function initv: Integer;
implementation
function initv: Integer;
var
p : NSNumber;
begin
p:=NSNumber.NumberwithInt(1);
result:=p.integerValue;
p.release;
end;
end.
----
Additional information:
$ fpc -vhn test.pas
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.6.4 [2014/02/26] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Darwin for i386
Compiling test.pas
Compiling test2.pas
test2.pas(8,5) Hint: Unit "objc" not used in test2
test2.pas(8,5) Hint: Unit "objcbase" not used in test2
Assembling (pipe) test2.s
test.pas(6,5) Hint: Unit "objc" not used in test
test.pas(6,5) Hint: Unit "objcbase" not used in test
Assembling (pipe) test.s
Mantis conversion info:
- Mantis ID: 27691
- Platform: darwin
- Version: 2.6.4
- Fixed in version: 3.0.1
- Fixed in revision: 32665 (#e0ca083c)