[cfe-commits] adding "-fasan" flag
chandlerc at google.com
Tue Nov 15 22:51:59 CST 2011
On Tue, Nov 15, 2011 at 8:46 PM, Kostya Serebryany <kcc at google.com> wrote:
>> See http://clang.llvm.org/docs/LanguageExtensions.html#feature_check --
>> it should be completely compiler neutral.
> So, the user code will have to look like this?
> #ifndef __has_feature
> # define __has_feature(x) 0
> #if __has_feature(address_sanitizer)
I would hope it could be simplified as:
#if defined(__has_feature) && __has_feature(address_sanitizer)
But either way, yes in essence.
> Also, is that indeed the right use of __has_feature? Maybe __has_extension
> fits better?
> Hm, asan is not an extension nor a (C++ standard) feature.
This is a good point. I wonder if there needs to be another __has_* macro
John? (maybe Doug?) I don't know what to call it. It's a feature which is
not related to the standard in any way.
There are other things that I can conceive of wanting to put here:
-fcatch-undefined-behavior, -ftrapv, etc...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits