Re: gcc4.1.0: error: object missing in reference to

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 07:19 05.12.2006 -0600, you wrote:
>Hi Fabian,
>
>Is m_cData a static member?

No, normal struct member.

>If not, then I don't think you can do a sizeof(SINOSEventLogBuffer::m_cData)
>on that.

Why is that a problem? I can do sizeof(SINOSEventLogBuffer) without
a problem, why not a member as well? Older gcc's didn't have a problem
with that. I know, newer gcc's have much stricter checking.

Even if this is considered not good programming style, why is it so serious
to be an error and not just a warning?

>Try this instead:
>
>m_uMaxEntrySize = sizeof(((SINOSEventLogBuffer*)NULL)->m_cData);

Yes, that works, thanks a lot.

bye  Fabi



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux