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

Serge Pavlov sepavloff at gmail.com
Thu Dec 18 22:02:45 PST 2014


2014-12-18 19:56 GMT+06:00 Joerg Sonnenberger <joerg at britannica.bec.de>:
>
> On Thu, Dec 18, 2014 at 05:33:11PM +0600, Serge Pavlov wrote:
> > The solution still lacks support of an important case. As were noted, the
> > pattern:
> >
> >     #define inline
> >
> > is used in configuration scripts. It may convert inline function to
> global
> > functions, linker will report duplicate definitions in this case.
>
> Given that most inline users in C use it in combination with static, I
> don't think it is that big a problem.
>
>
I mentioned compilation of PHP extensions, where this problem was observed.
A PHP extension may use some library, which provides its own config.h and
must use PHP API, which comes with another config.h, these can clash. Any
compilation, when different APIs are used, potentially may suffer from this
problem. Also the components may use different languages, C and C++.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141219/e99666b5/attachment.html>


More information about the cfe-commits mailing list