[fpc-devel] Typed addresses, revisited

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Oct 8 11:51:51 CEST 2006


On 08 Oct 2006, at 11:39, Florian Klaempfl wrote:

> I think the construct
> @var+1
> is dangerous because
> - its pointer magic (always not good ;))
> - its behaviour depends on T+/-
>
> Making it pointer(@var)+1 clarifies things.

That's true. I did not look at the code changes in the compiler, only  
at the log message:

   add warning for arithmetic on untyped pointers

As far as I can see, what's been done is actually:

   add warning for arithmetic on non-typecasted @-expressions

I don't have a problem with that. One thing which still should be  
changed about the patch is that nf_typedaddr should also be included  
for nf_internal type conversions (and the code style should conform  
to the one used in the rest of the modified units, i.e. "end" and  
"else" should be on a different line).


Jonas



More information about the fpc-devel mailing list