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]

Re: how to compute offset of data member at compile time (virtual class)


On Fri, 26 Oct 2007 04:59:20 +1000
skaller <skaller@users.sourceforge.net> wrote:

> I use offsetof() on constructible types with virtual functions
> extensively in Felix to calculate the offsets of every pointer
> in every heap allocated data type. Thankfully gcc has a switch
> now which allows this, -Wno-invalid-offsetof, because it is the 
> only way to get the information required, and the 
> information is mandatory for my garbage collector. It works fine
> on MSVC++ too.

THANK YOU! I'd missed the -Wno-invalid-offsetof switch, that
did the trick.

j

-- 
John Gateley <gateley@jriver.com>


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