[llvm-bugs] [Bug 28506] New: <cmath>: C++11 templates disabled (?) on sunos

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 11 10:13:58 PDT 2016


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

            Bug ID: 28506
           Summary: <cmath>: C++11 templates disabled (?) on sunos
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mgorny at gentoo.org
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

I'm attempting to build new LLVM using current nightly pathCC (w/ libcxx
backend) on openindiana. I'm getting the following error:

/root/mgorny-test/enzo-suite/ekopath/psllvm/lib/DebugInfo/Symbolize/DIPrinter.cpp:52:41:
error: 
      call to 'log10' is ambiguous
  size_t MaxLineNumberWidth = std::ceil(std::log10(LastLine));
                                        ^~~~~~~~~~
/usr/include/iso/math_iso.h:81:15: note: candidate function
extern double log10 __P((double));
              ^
/usr/include/iso/math_iso.h:179:15: note: candidate function
        inline float log10(float __X) { return __log10f(__X); }
                     ^
/usr/include/iso/math_iso.h:209:21: note: candidate function
        inline long double log10(long double __X) { return __log10l(__X); }
                           ^
1 error generated.


It seems that LLVM has started relying on the C++11 integral definition of
log10(). However, the one provided in libcxx is #ifndef'ed for __sun__. I guess
this happens because system math.h is including iso/math_iso.h which has some
C++ definitions aside the usual C functions. Sadly, those definitions lack
support for C++11.

-- 
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/20160711/188003d1/attachment.html>


More information about the llvm-bugs mailing list