[fpc-devel] Typed addresses, revisited

Micha Nelissen micha at neli.hopto.org
Sat Oct 7 21:42:20 CEST 2006


Hi,

You guessed it: I've applied another patch :-), rev 4823.

I've reverted the 'enable {$T+} for fpc/objfpc modes' bit. So now all
your sources will compile as they previously did. Enabling did catch a
bug here and there, but also caused at least one (typinfo).

I propose to enable it for 2.3/2.9, i.e. after 2.2, because, as Jonas
said, it breaks semantics for arithmetic on non-typecasted pointers that
point to something that is not size 1.

To that end, the compiler will now warn you of possible {$T+}-breaking
code: when you do arithmetic on an untyped pointer. Tests tbf/tb0182,
tbf/tb0183, and tbs/tb0504 test the proper working of this warning.

Micha



More information about the fpc-devel mailing list