[Bug c++/102228] lookup_anon_field is quadratic

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 7 11:19:33 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102228

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think there must be also a 1:1 correspondence to anon type and its single use
FIELD_DECL thus building a back-chain via DECL_CONTEXT and a new
ANON_AGGR_TYPE_FIELD should be possible.

At least I failed to do sth like

typedef struct { int i; } T;
struct X {
    T;
};
struct Y {
    T;
};

aka use the same aggregate type anonymously from two contexts.


More information about the Gcc-bugs mailing list