[PATCH] Emit an extension warning when changing system header tokens
Alp Toker
alp at nuanti.com
Mon Dec 2 23:36:50 PST 2013
r196212
On 03/12/2013 01:29, Reid Kleckner wrote:
> Looks good to me.
>
>
> On Thu, Nov 28, 2013 at 4:27 AM, Alp Toker <alp at nuanti.com
> <mailto:alp at nuanti.com>> wrote:
>
> clang converts keywords to identifiers for compatibility with
> various system headers such as GNU libc.
>
> The attached patch adds an extension warning diagnostic in those
> cases. The warning is typically ignored by default when the issue
> is encountered in system headers, but can be enabled to aid in
> standards conformance testing.
>
> This also changes the __uptr keyword avoidance from r195710 to not
> be special-cased for system headers now that a warning is in
> place, bringing it in line with other similar workarounds in clang.
>
> Some examples:
>
> |warning: keyword '__is_pod' will be treated as an identifier for
> the remainder of the translation unit [-Wkeyword-compat]||
> ||struct __is_pod||
> ||
> ||warning: keyword '__uptr' will be treated as an identifier here
> [-Wkeyword-compat]||
> ||union w *__uptr;|
>
> Alp.
>
> --
> http://www.nuanti.com
> the browser experts
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu <mailto:cfe-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
--
http://www.nuanti.com
the browser experts
More information about the cfe-commits
mailing list