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: unassignedclangb...@nondot.org
          Reporter: rianqu...@gmail.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to