[fpc-devel] published versus advanced rtti
Michael Van Canneyt
michael at freepascal.org
Fri Oct 23 11:42:13 CEST 2026
On Fri, 23 Oct 2026, Martin Frb via fpc-devel wrote:
> Afaik the published keywords only purpose is to add RTTI (or do nothing,
> depending on $M).
>
> Afaik using advanced rtti (I haven't done yet) you can add RTTI to other
> fields too?
Yes.
>
>
> If so, is there any difference in the result?
Yes. Extended RTTI is put in separate tables, although we try to re-use
existing data for published property RTTI.
>
>
> The reason for asking is that this is under discussion for adding Dwarf
> representation. Originally based on the idea to mark published fields. But
> since other language have rtti too, using the name "published" would be to
> limiting (as Pascal only). So the idea now is to add a flag, that a field has
> rtti => in Pascal to be used to point out published.
... and when extended RTTI is present ?
> If advanced RTTi is effectively the same as published (albeit possible with
> extended info), then its likely going to be the one flag. If there are
> reasons where the difference between published and advanced needs to be
> known, then this may be the time to make it known.
The means of accessing the info is different, so it is probably necessary to
have 2 flags.
Michael.
More information about the fpc-devel
mailing list