On Thu, Apr 26, 2012 at 2:23 PM, Joerg Sonnenberger <[email protected]> wrote: > On Thu, Apr 26, 2012 at 01:26:23PM +0400, Evgeniy Stepanov wrote: >> Because that's how things work. > > The classic definition of offsetof is valid C. As long as you don't deal > with C++, using __builtin_offsetof is optional. As such, this would > trigger redef warnings on valid code.
AFAIK, there can be no redef warnings in a compiler header. > >> This header also does not fully respect __need_size_t and friends, >> even though it should. This is a (undocumented) contract between gcc >> and glibc headers. As we replace one part of the system, we are >> responsible to do all the necessary hacks to maintain compatibility. > > Not everyone uses glibc. Your changes should not create regressions for > other supported platforms. Of course, most other platforms do provide a > sane stddef.h that works with the rest of the system headers. Do you know where this will cause a regression? For the record, gcc header stddef.h also redefines offsetof every time it is included. > > Joerg > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
