Conditional compilation when using -fsanitize=thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've currently adding support to QEMU for building with the various
sanitizers in later GCC's. I've had to replace QEMU's atomic_read
implementation with one that explicitly uses the GCC built-in to avoid a
number of false positives. However I'd like that change to only be done
when building a sanitized build.

The manual implies you can do:

  #if __has_feature(thread_sanitizer)

But AFAICT this doesn't work under GCC as it seems to be a clang-ism. Is
there an equivalent for GCC?

--
Alex Bennée



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux