internal error 1234124
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
this error occurs becase compiler/symtable.pas/objpasunit is global;
it should be local relatively to each unit, otherwise the following
takes place: suppose unit u1 defines {mode objfpc}; compiler parses<br/> this directive, loads objpas.pp? and sets objpasunit global variable.<br/> now, unit u1 uses another unit u2, which does not declare {mode objfpc}.
this leads to resetting objpasunit to nil (pmodules.pas, around line 654).
later, when compiler returns to parse the remainder of unit u1,
objpasunit is nil and any attempt to use objfpc-specific constructs
(like array of const) would inevitably fail. also, since objpas redefines
integer types, this bug leads to incompatibility in interface/implementation
procedure definitions, which was the reason for posting bug report #584.
it wasn't fixed, but erroneously commented on that such a behavior is
'a risk of combining tp and delphi code', which is not true.
see program to simulate the bug.
Additional information:
Reporter: Denis Yarkovoy
EMail: gunky9 at geocities dot com
Mantis conversion info:
- Mantis ID: 2676
- OS: Linux
- Version: ?
- Fixed in version: 0.99.13