This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ Patch] PR 66644


Hi,

only when Jakub bumped some bugs in preparation for the release I noted that this one remained assigned to me for way too much time...

Roughly speaking, the problem is caused by the fact that when we have a GNU anonymous struct inside a union the fields are flattened out and appear to be just individual fields of the union. Thus we end up rejecting test1 below because multiple fields are initialized and we don't simply handle them later on as NSDMIs. A GNU anonymous struct is required for the issue to show up, thus the details of the way we want to handle such code are debatable, but we know that, eg, both EDG and clang accept test1 too (in relaxed GNU mode, at least), besides test2 and test3.

Given the underlying cause of the rejection I could easily imagine other less straightforward ways to match the cases at issues in check_field_decl (eg, along the lines DECL_CONTEXT (field) == t ??), but the below certainly passes testing on x86_64-linux.

Thanks,
Paolo.

////////////////////////////

Attachment: CL_66644
Description: Text document

Attachment: patch_66644
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]