This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: PR 21308
- From: Richard Henderson <rth at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 6 Nov 2005 14:02:57 -0800
- Subject: Re: C++ PATCH: PR 21308
- References: <200511061953.jA6JrMau020947@sethra.codesourcery.com>
On Sun, Nov 06, 2005 at 11:53:22AM -0800, Mark Mitchell wrote:
> + if (CLASSTYPE_EMPTY_P (t)
> + && tree_int_cst_lt (sizeof_biggest_empty_class, TYPE_SIZE (t)))
> + sizeof_biggest_empty_class = TYPE_SIZE (t);
...
> + sizeof_biggest_empty_class = size_zero_node;
It probably doesn't matter much, but TYPE_SIZE is of type
bitsizetype, not sizetype. I'd suggest that you either
use TYPE_SIZE_UNIT (which would be consistent with the
"sizeof" name), or use bitsize_zero_node so that the
types match across the comparison.
r~