[libcxx] r299385 - suppress GCC warning about noexcept functions changing mangling

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 3 18:22:52 PDT 2017


Thanks, that makes sense, I forgot to check for noexcept function types in
template arguments. (Though I think GCC's diagnostic is sort of wrong or at
least missing the point in this case, which is that 't' will have a
different type in C++17.)

On 3 Apr 2017 1:33 pm, "Eric Fiselier" <eric at efcs.ca> wrote:

Here is a reduced version.

void glibc_function() throw() {}

template <class T> struct Test {
  Test() {} // expected-error {{mangled name for 'Test<T>::Test()' will
change in C++17}}
  ~Test() {}  // expected-error {{mangled name for 'Test<T>::~Test()' will
change in C++17}}
};

Test<decltype(&glibc_function)> t;

/Eric

On Mon, Apr 3, 2017 at 5:17 PM, Eric Fiselier <eric at efcs.ca> wrote:

> I'll create a reduced reproducer, but it'll take some time because GCC is
> quite cryptic about the instantiation stack.
>
> if you want many instances within the libc++ build simply revert this
> commit and build with a new GCC.
>
> /Eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170403/64baadd1/attachment.html>


More information about the cfe-commits mailing list