On 30/03/14 15:24, Martin Frb wrote:
The below program compiles fine (and generates no warning (fpc 2.6.2 / win 32)
It only compiles fine with the (default) {$t-}. If you add {$t+}, it doesn't compile. Without typed pointers, the result of the @-operator is an untyped pointer, which by definition is assignment-compatible with all other pointer types.
Making {$t+} the default is hard because it could break existing, correct code (e.g., "untypedptr:=@wordvar+1" would result in a pointer 2 bytes after @wordvar instead of 1 with {$t+}).
Jonas _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel