This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc4.1.0: error: object missing in reference to
- From: Fabian Cenedese <Cenedese at indel dot ch>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 05 Dec 2006 14:38:47 +0100
- Subject: Re: gcc4.1.0: error: object missing in reference to
- References: <5.2.0.9.1.20061205104311.0184e310@NT_SERVER>
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