[cfe-dev] Disable GNU defines in Clang?
Eric Christopher
echristo at gmail.com
Fri Mar 1 22:31:55 PST 2013
You could always use something like -U__GNUC_MINOR__ on the command line
for each of the defines? It's a bit of a hack workaround, but...
-eric
On Fri, Mar 1, 2013 at 1:47 PM, Jeffrey Walton <noloader at gmail.com> wrote:
> Hi All,
>
> I want to disable Clang defining __GNUC__ and friends. Its causing a
> few problems in a couple of projects I'm interested in. In addition,
> its causes problems in other's work (confer,
> https://svn.boost.org/trac/boost/ticket/7473).
>
> $ clang -dM -E -x c /dev/null | grep -i gnu
> #define __GNUC_MINOR__ 2
> #define __GNUC_PATCHLEVEL__ 1
> #define __GNUC_STDC_INLINE__ 1
> #define __GNUC__ 4
> #define __gnu_linux__ 1
>
> I've been through http://clang.llvm.org/docs/UsersManual.html, and I
> don't see an option to request the behavior.
>
> Is there any way to instruct Clang to *not* define GNUC, GNUC_MINOR,
> and GNUC_PATCHLEVEL?
>
> Jeff
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130301/05953de6/attachment.html>
More information about the cfe-dev
mailing list