This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ Patch] PR 53761
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Jason Merrill <jason at redhat dot com>
- Date: Wed, 10 Oct 2012 17:13:06 +0200
- Subject: [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