This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/21930] C-only gcc builtins used in <math.h> isinf


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]