[cfe-commits] [PATCH] stddef.h: redefine offsetof macro every time the header is included

Chandler Carruth chandlerc at google.com
Thu Apr 26 10:14:35 PDT 2012


Just to comment on one part of this discussion:

On Thu, Apr 26, 2012 at 3:38 AM, Evgeniy Stepanov <eugeni.stepanov at gmail.com
> wrote:

> AFAIK, there can be no redef warnings in a compiler header.
>

There are warnings, but due to being system headers, they are typically
suppressed.

That said, generating (and suppressing) warnings isn't free, so we should
avoid doing so unnecessarily. As such, using undef seems reasonable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120426/2b44a51d/attachment.html>


More information about the cfe-commits mailing list