[fpc-devel] Typed addresses by default

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Oct 5 18:49:37 CEST 2006


On 5 okt 2006, at 18:41, Micha Nelissen wrote:

> Jonas Maebe wrote:
>> But this does not help users, third party packages etc. Breaking
>> compilation of sloppy code is one thing, but introducing silent  
>> bugs is
>> a whole other issue.
>
> Hmm. What type is @X in {$T-} ? Is it a special type ? Maybe the
> compiler can give a warning when you do arithmetic on this kind of  
> type ?

It's a plain void pointer (like when you would add a pointer() type  
cast around it).

>>> $ (find -regex '.*\.\(pp\|pas\|inc\)' | xargs grep '@[^,]*+') | less
>>
>> Shouldn't that be '@[^,]+' ?
>
> No, the idea is to find @expr+, so where you take the address *and* do
> arithmetic on the result. That's why there aren't that many cases  
> of it.

Shouldn't the + then be escaped normally? Or is it only "1 or more of  
the previous" in egrep?


Jonas



More information about the fpc-devel mailing list