------- Comment #6 from bero at arklinux dot org  2006-05-23 21:41 -------
It is creative offsetof indeed -- this a "explanation" from a bit of code
referenced to this one [while it isn't free yet, its license does allow posting
bits of it online]:



// HACK: gcc warns about applying offsetof() to non-POD object or calculating
//       offset directly when base address is NULL. Use 16 to get around the
//       warning. gcc-3.4 has an option -Wno-invalid-offsetof to suppress
//       this warning.
#define offset_of(klass,field) (size_t)((intx)&(((klas*)16)->field) - 16)



Looks like someone was desperate to get his stuff to compile with -Werror
without having to fix the cause.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27724

Reply via email to