[llvm-bugs] [Bug 36317] New: Compiler ToT on Ubuntu 17.10 results in error

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 9 01:03:25 PST 2018


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

            Bug ID: 36317
           Summary: Compiler ToT on Ubuntu 17.10 results in error
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: santosh.zanjurne at amd.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

Building compiler sources on Ubuntu 17.10 with default gcc version 7.2.0
results in following build error, when the sources are build with flag
-DLLVM_ENABLE_WERROR=ON.

[  0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o
cd /home/amd/santosh/llvm/trunk/build/lib/Support && /usr/bin/c++ 
-DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/home/amd/santosh/llvm/trunk/build/lib/Support
-I/home/amd/santosh/llvm/trunk/llvm/lib/Support -I/usr/include/libxml2
-I/home/amd/santosh/llvm/trunk/build/include
-I/home/amd/santosh/llvm/trunk/llvm/include  -fPIC -fvisibility-inlines-hidden
-Werror -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic
-Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
-ffunction-sections -fdata-sections -O3    -UNDEBUG  -fno-exceptions -fno-rtti
-o CMakeFiles/LLVMSupport.dir/Process.cpp.o -c
/home/amd/santosh/llvm/trunk/llvm/lib/Support/Process.cpp
In file included from
/home/amd/santosh/llvm/trunk/llvm/lib/Support/Unix/Unix.h:24:0,
                 from
/home/amd/santosh/llvm/trunk/llvm/lib/Support/Unix/Process.inc:14,
                 from
/home/amd/santosh/llvm/trunk/llvm/lib/Support/Process.cpp:94:
/home/amd/santosh/llvm/trunk/llvm/include/llvm/Support/Errno.h:34:13: error:
mangled name for ‘decltype (F(llvm::sys::RetryAfterSignal::As ...))
llvm::sys::RetryAfterSignal(const FailT&, const Fun&, const Args& ...) [with
FailT = int; Fun = int(int, stat*) throw (); Args = {int, stat*}]’ will change
in C++17 because the exception specification is part of a function type
[-Werror=noexcept-type]
 inline auto RetryAfterSignal(const FailT &Fail, const Fun &F,
             ^~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

The code that results in an error is "decltype", from
include/llvm/Support/Errno.h, 

template <typename FailT, typename Fun, typename... Args>
inline auto RetryAfterSignal(const FailT &Fail, const Fun &F, const Args &...
As) -> decltype(F(As...)) {
  decltype(F(As...)) Res;
  do
    Res = F(As...);
  while (Res == Fail && errno == EINTR);
  return Res;
}

-- 
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/20180209/5dcc1ea6/attachment.html>


More information about the llvm-bugs mailing list