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 53761


Hi,

in this PR, at variance with the C front-end, we don't check well enough the aggregate type - in finish_struct_1 - and we ICE later. Then I'm essentially copying from the C front-end the check. Some details:

1- In these checks, eg, no fields too, the C front-end only warns, zeroes TYPE_TRANSPARENT_AGGR and continues. We emit an hard error and zero TYPE_TRANSPARENT_AGGR as error recovery measure. I'm doing the same for this additional check.

2- The existing diagnostics, eg, for no fields, again, talks about "class", I think we can distinguish "class" vs "union" (when it makes sense, I'm leaving alone bases, virtuals, already rejected by the parser for unions)

Tested x86_64-linux, as usual.

Thanks,
Paolo.

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

Attachment: CL_53761
Description: Text document

Attachment: patch_53761
Description: Text document


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