Am 30.11.2019 um 13:27 schrieb bla...@blaise.ru:
{ This is a resubmission of
https://lists.freepascal.org/pipermail/fpc-devel/2019-August/041915.html
}
trecorddef.create_global_internal generates internal RecordDef names as
'$InternalRec'+tostr(current_module.deflist.count)
However, since such internal RecordDefs are not necessarily registered
afterwards (i.e. deflist.count is not going to be bumped), such names
do not contain actual DefIDs, and thus are not unique within a module.
(See the original email for a test case.)
1) So, what is the point of that misleading numerical suffix? I
propose that it be dropped.
2) My understanding is that a name should never be autogenerated for
an internal RecordDef that is going to be registered with a DefID. I
propose that this be asserted (two variants are offered).
The same draft patch is attached.
I've fixed this now in r43616 by using the correct way to generate a
unique ID string. The LLVM backend makes use of anonymous record defs
and I don't know whether your patch would break that.
Regards,
Sven
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel