Hi! Once mangle_decl warns once about the mangling changes for C++1z, it warns about all following symbols, including stuff like <built-in>, .L* symbols etc. or any other symbols that are not affected by the exception specification mangling changes. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, approved by Jason in the PR, committed to trunk.
2016-11-09 Jakub Jelinek <ja...@redhat.com> PR c++/78283 * mangle.c (start_mangling): Reset G.need_cxx1z_warning. * g++.dg/cpp1z/noexcept-type13.C: New test. --- gcc/cp/mangle.c.jj 2016-11-09 15:22:35.000000000 +0100 +++ gcc/cp/mangle.c 2016-11-09 21:45:44.013378262 +0100 @@ -3649,6 +3649,7 @@ start_mangling (const tree entity) { G.entity = entity; G.need_abi_warning = false; + G.need_cxx1z_warning = false; obstack_free (&name_obstack, name_base); mangle_obstack = &name_obstack; name_base = obstack_alloc (&name_obstack, 0); --- gcc/testsuite/g++.dg/cpp1z/noexcept-type13.C.jj 2016-11-09 21:43:45.835873413 +0100 +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type13.C 2016-11-09 21:44:32.906277891 +0100 @@ -0,0 +1,14 @@ +// PR c++/78283 +// { dg-do compile } +// { dg-options "-Wall" } + +void foo () throw () {} // { dg-bogus "mangled name" } + +template <class T> +T bar (T x) { return x; } // { dg-warning "mangled name" "" { target c++14_down } } + +void baz () { // { dg-bogus "mangled name" } + return (bar (foo)) (); +} + +void decl () {} // { dg-bogus "mangled name" } Jakub