[cfe-dev] Disable GNU defines in Clang?
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...
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,
> $ 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?
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev