This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60336] empty struct value is passed differently in C and C++
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Nov 2015 11:19:50 +0000
- Subject: [Bug c++/60336] empty struct value is passed differently in C and C++
- Auto-submitted: auto-generated
- References: <bug-60336-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #40 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #38)
> Created attachment 36724 [details]
> An updated patch to add empty_record_p
>
> I am testing it now.
It doesn't work since it misses
for (binfo = TYPE_BINFO (type), i = 0;
BINFO_BASE_ITERATE (binfo, i, base_binfo); ++i)
if (!is_really_empty_class (BINFO_TYPE (base_binfo)))
return false;
in is_really_empty_class in cp/class.c. It is language specific.