re PR c++/78283 (-Wc++1z-compat warning is sticky)

PR c++/78283
	* mangle.c (start_mangling): Reset G.need_cxx1z_warning.

	* g++.dg/cpp1z/noexcept-type13.C: New test.

From-SVN: r242026
This commit is contained in:
Jakub Jelinek 2016-11-09 23:56:35 +01:00 committed by Jakub Jelinek
parent 7ce69e5a71
commit 0391e4a3b3
4 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2016-11-09 Jakub Jelinek <jakub@redhat.com>
PR c++/78283
* mangle.c (start_mangling): Reset G.need_cxx1z_warning.
2016-11-09 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_simple_type_specifier): Allow placeholder

View File

@ -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);

View File

@ -1,3 +1,8 @@
2016-11-09 Jakub Jelinek <jakub@redhat.com>
PR c++/78283
* g++.dg/cpp1z/noexcept-type13.C: New test.
2016-11-09 Toma Tabacu <toma.tabacu@imgtec.com>
* gcc.target/mips/mips.exp (mips-dg-options): Upgrade to MIPS IV if

View File

@ -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" }