This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/21930] C-only gcc builtins used in <math.h> isinf
- From: "jsm28 at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 09 Aug 2017 17:41:14 +0000
- Subject: [Bug math/21930] C-only gcc builtins used in <math.h> isinf
- Auto-submitted: auto-generated
- References: <bug-21930-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21930
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gftg at linux dot vnet.ibm.com
--- Comment #1 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Gabriel, I had thought this usage - and the definition of
__HAVE_GENERIC_SELECTION, which relates to a C-only feature but is not
conditional on C in any way - was harmless because C++ doesn't actually use
these macros (libstdc++ undefines them in its headers and defines its own
function overloads). Or, at least, that it was harmless except for
issignaling, which libstdc++ doesn't handle. But given the configure test,
maybe that needs revisiting.
(a) Don't define __HAVE_GENERIC_SELECTION for C++.
(b) The use of __builtin_choose_expr is unnecessary, a conditional expression
should suffice. (__typeof *is* supported for C++, it's
__builtin_choose_expr and __builtin_types_compatible_p that aren't.)
(c) Use some suitable C++ magic in place of __builtin_types_compatible_p
(remembering that __builtin_types_compatible_p explicitly removes type
qualifiers, and alternative C++ magic needs to do likewise).
--
You are receiving this mail because:
You are on the CC list for the bug.