public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/66970] New: Add __has_builtin() macro
@ 2015-07-22 14:58 gcc at crg4 dot com
  2015-07-26  9:21 ` [Bug c/66970] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: gcc at crg4 dot com @ 2015-07-22 14:58 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c/66970] Add __has_builtin() macro
  2015-07-22 14:58 [Bug preprocessor/66970] New: Add __has_builtin() macro gcc at crg4 dot com
@ 2015-07-26  9:21 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-07-26  9:21 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|preprocessor                |c

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Why do you need this?
Why can't you check before doing a compiling if the builtin exists?  That is
use autoconfig like all standard open source products do.  You still need to do
that for older versions of the compilers anyways.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-26  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-22 14:58 [Bug preprocessor/66970] New: Add __has_builtin() macro gcc at crg4 dot com
2015-07-26  9:21 ` [Bug c/66970] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).