https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970

            Bug ID: 66970
           Summary: Add __has_builtin() macro
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc at crg4 dot com
  Target Milestone: ---

gcc has a large collection of builtins (intrinsics), as listed at
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html

A useful feature would be a __has_builtin() macro, as implemented in clang:
http://clang.llvm.org/docs/LanguageExtensions.html#feature-checking-macros

This would allow feature detection rather than requiring checks against
compiler names and versions.

Support for this enhancement was expressed on the mailing list (Sep 2012)
http://comments.gmane.org/gmane.comp.gcc.help/42610
but it looks like it was never submitted as a bug.

Reply via email to