<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Compiler ToT on Ubuntu 17.10 results in error"
   href="https://bugs.llvm.org/show_bug.cgi?id=36317">36317</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compiler ToT on Ubuntu 17.10 results in error
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>santosh.zanjurne@amd.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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;
}</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>