On Aug 21, 2006, at 7:51 AM, Perry E. Metzger wrote:
I'm not sure this is 100% correct. I think it would be better to do an #ifdef so that __builtin_offsetof() is used only if __GNUC__, and otherwise use the old one. Otherwise we can break compilation with other compilers. (It might be reasonable to make that contingent on gcc4...)
Yes, you also need to provide the old version for lint(1).If __builtin_offsetof() is provided by GCC3, no harm in allowing it for that compiler.
-- thorpej