This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sizeof in initializer expression not working as expected
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: GCC Development <gcc at gcc dot gnu dot org>, Bruce Korb <bkorb at gnu dot org>
- Date: Thu, 29 Jan 2009 17:16:16 +0100
- Subject: Re: sizeof in initializer expression not working as expected
- References: <49814497.2060309@gnu.org>
Bruce Korb wrote:
> Hi,
>
> I was trying to figure out how come a memory allocation was short.
> I think I've stumbled onto the issue. "evt_t" is a 48 byte structure
> and "tpd_uptr" is a uintptr_t. "sz" initializes to 52 (decimal).
> The value would be correct if I were not trying to multiply the
> size of the pointer by 4. The result should be 64.
I think all you can do is the usual preprocessed testcase submission to
bugzilla.
Paolo