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

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


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