Re: The Seriousness of GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO
Re: The Seriousness of GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO
- Subject: Re: The Seriousness of GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO
- From: Brad Oliver <email@hidden>
- Date: Thu, 15 Mar 2007 13:06:05 -0700
On Mar 15, 2007, at 12:09 PM, email@hidden wrote:
On 3/15/07, Lyndsey Ferguson <email@hidden> wrote:
Hello Everyone,
I wanted your opinion of about how serious the
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO compiler option is to be taken.
According to the ANSI C++, offsetof is undefined for non-POD*
objects,
including any class or struct with a constructor. Many of our
structure
types are not PODs by this definition.
Apparently, in practice, this has been found to be an unnecessary
restriction on offsetof, and it is expected that this will be
loosened in
future versions of the Standard.
How serious is this warning? We would like to turn of this warning
in an
attempt to come closer to 0 warnings.
My understanding is that GCC uses that warning to tell you that you've
written non-standard code, and that it may not do what you expect if
you were to use a different compiler.
I have ported code from VS .NET that relied on this, and it worked
flawlessly in both gcc 4/Xcode and CW 9.x. YMMV.
--
Brad Oliver
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden