c++: Name as_base type
Nathan Sidwell
nathan@acm.org
Wed Jul 22 19:06:53 GMT 2020
The as-base type never got a name. For modules I needed to give it a
name to serialize properly, and it's useful when debugging the compiler,
so we may as well have it on trunk. There's also a bug where its fields
can have NSDMIs from the main class. This happens to be silent on
trunk, but can be a GC leak where we retain a deferred parse node there.
(On modules it blows up, because we're not prepared to serialize
deferred parse nodes, as they should never survive parsing.
gcc/cp/
* cp-tree.h (enum cp_tree_index): Add CPTI_AS_BASE_IDENTIFIER.
(as_base_identifier): Define.
* decl.c (initialize_predifined_identifiers): Initialize
as_base
identifier.
* class.c (layout_class_type): Name the as-base type. Zap
NSDMI its fields may have.
--
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: as-base.diff
Type: text/x-patch
Size: 2696 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200722/d39cd9ee/attachment.bin>
More information about the Gcc-patches
mailing list