Marcus Meissner marcus@jet.franken.de writes:
gcc 3.5 no longer likes our own OFFSETOF() macro in winebuild, so we should use the standard one from <stddef.h>
Not all platforms have offsetof (or even stddef.h). What's wrong with our definition?
On Tue, Sep 07, 2004 at 09:35:15AM -0700, Alexandre Julliard wrote:
Marcus Meissner marcus@jet.franken.de writes:
gcc 3.5 no longer likes our own OFFSETOF() macro in winebuild, so we should use the standard one from <stddef.h>
Not all platforms have offsetof (or even stddef.h). What's wrong with our definition?
Apparently it is a GNU extension which got dropped from the new compiler.
GCC Bugzilla discussion is here.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17339
I am not really happy either about it.
Ciao, Marcus
Alexandre Julliard wrote:
Marcus Meissner marcus@jet.franken.de writes:
gcc 3.5 no longer likes our own OFFSETOF() macro in winebuild, so we should use the standard one from <stddef.h>
Not all platforms have offsetof (or even stddef.h). What's wrong with our definition?
offsetof is ANSI C, see http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/CLanguageRef/... which states:
Recommended Practices
Follow these recommendations as you code:
... Use the offsetof() macro to derive structure member offsets. The offsetof() macro is in <stddef.h>.
Which platforms are still not ANSI C nowadays ?
Regards
Dominik
Dominik Strasser dominik.strasser@infineon.com writes:
Follow these recommendations as you code:
... Use the offsetof() macro to derive structure member offsets. The offsetof() macro is in <stddef.h>.
Which platforms are still not ANSI C nowadays ?
I don't know about nowadays, but I know we encountered that problem at some point. Anyway I have since changed the code to not require offsetof at all.