r224012 - Emit warning if define or undef reserved identifier or keyword.

Serge Pavlov sepavloff at gmail.com
Mon Dec 15 09:06:24 PST 2014


2014-12-15 22:35 GMT+06:00 Joerg Sonnenberger <joerg at britannica.bec.de>:
>
>
> My question remains: what bugs has this warning caught? I've heard that
> Microsoft believes this to be reasonable to warn about, but that's about
> it.
>
> There are cases when defining keywords produces errors which are diffucult
to analyze. For instance PHP uses definitions like '#define inline
something'. In some configurations it becomes '#define inline' which
effectively removes 'inline' specifier. As a result, linker complains about
duplicate definitions. Looking into the code does not help, as functions
looks inline and must not cause problems. Even if one suspect that 'inline
is removed by 'define', finding proper place may be not simple. Such
warning makes solving these problems easier.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141215/b8f5eaa7/attachment.html>


More information about the cfe-commits mailing list