[fpc-pascal] += property bug?
Sven Barth
pascaldragon at googlemail.com
Tue Aug 13 17:09:05 CEST 2019
Martok <listbox at martoks-place.de> schrieb am Di., 13. Aug. 2019, 14:44:
> Am 12.08.2019 um 11:31 schrieb Sven Barth via fpc-pascal:
> > The code you linked converts "a += b" to "tmp := @a; tmp^ := tmp^ + b",
> so
> > except for using a temp to avoid duplicate calculation of "a" in how far
> is this
> > not the long form?
>
> No, I meant it doesn't re-parse as its long form, which is why it has some
> limitations. In this case for example handle_propertysym does not know it
> is
> actually seeing an assignment.
>
> I don't think the compiler can do this? Macros are expanded on the scanner
> level, token stream injection is not a thing in FPC, AFAICS?
>
It could be done, but property support for the C operators is not
*desired*. See the entry of the function you posted: properties are
explicitly rejected.
In general the C operators are not desired. They where added way in the
past in a weak moment and I don't think they'd be added today if FPC
wouldn't have them already.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190813/1eefe7be/attachment.html>
More information about the fpc-pascal
mailing list