This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
warning: invalid offsetof from non-POD type
- From: John Quigley <johnw at lowestplane dot org>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 28 Mar 2003 08:47:53 -0800
- Subject: warning: invalid offsetof from non-POD type
Hello,
I maintain the GNU/Linux port of a large c++ system. When compiling it with
gcc3, I get hundreds of lines of warnings about "invalid offsetof from
non-POD type, use pointer to method instead". Despite these many warnings,
the executable works fine.
The system uses an "offsetof"-like macro to bind c++ member fields to its
internal scripting language. It is not a simple change to replace this
offsetof scheme with a pointer to member.
Can someone give me an example of code where the warning would fire and the
resulting code would give incorrect results?
Thanks,
- jq