This is the mail archive of the gcc@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]

Re: sizeof in initializer expression not working as expected


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


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