[llvm-bugs] [Bug 26128] New: libcxx fails to compile with newlib for cmath functions

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 13 04:09:52 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26128

            Bug ID: 26128
           Summary: libcxx fails to compile with newlib for cmath
                    functions
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rianquinn at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

In libcxx/include/cmath, use see the following:

...
using ::isinf;
using ::isnan;
...

In NewLib, these functions are macros. Here is a comment from the NewLib
source:

/* Note: isinf and isnan were once functions in newlib that took double
 *       arguments.  C99 specifies that these names are reserved for macros
 *       supporting multiple floating point types.  Thus, they are
 *       now defined as macros.  Implementations of the old functions
 *       taking double arguments still exist for compatibility purposes
 *       (prototypes for them are in <ieeefp.h>).  */

Currently I am patching libcxx with #ifndef _NEWLIB_VERSION wrapped around a
couple of these functions (there are several that have this issue). Not sure
what the correct solution would be, but this seems reasonable to me. 

- Rian

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160113/9b0ce43f/attachment.html>


More information about the llvm-bugs mailing list