+2016-11-10 Jakub Jelinek <jakub@redhat.com>
+
+ * mangle.c (mangle_decl): Only emit -Wc++1z-compat warnings for
+ public or external symbols.
+
2016-11-09 Jakub Jelinek <jakub@redhat.com>
PR c++/78283
}
SET_DECL_ASSEMBLER_NAME (decl, id);
- if (G.need_cxx1z_warning)
+ if (G.need_cxx1z_warning
+ && (TREE_PUBLIC (decl) || DECL_REALLY_EXTERN (decl)))
warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wc__1z_compat,
"mangled name for %qD will change in C++17 because the "
"exception specification is part of a function type",
+2016-11-10 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/cpp1z/noexcept-type14.C: New test.
+ * g++.dg/asan/asan_test.C: Remove -Wno-c++1z-compat from dg-options.
+
2016-11-10 James Greenhalgh <james.greenhalgh@arm.com>
* gcc.dg/torture/fp-int-convert.h (M_OK2): New, use it in
// { dg-skip-if "" { *-*-* } { "*" } { "-O2" } }
// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
// { dg-additional-sources "asan_globals_test-wrapper.cc" }
-// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Wno-c++1z-compat -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread -ldl" }
+// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread -ldl" }
// { dg-additional-options "-DASAN_NEEDS_SEGV=1" { target { ! arm*-*-* } } }
// { dg-additional-options "-DASAN_LOW_MEMORY=1 -DASAN_NEEDS_SEGV=0" { target arm*-*-* } }
// { dg-additional-options "-DASAN_AVOID_EXPENSIVE_TESTS=1" { target { ! run_expensive_tests } } }
--- /dev/null
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall" }
+
+#define A asm volatile ("" : : : "memory")
+void foo () throw () {}
+extern void f1 (decltype (foo) *); // { dg-bogus "mangled name" }
+void f2 (decltype (foo) *); // { dg-bogus "mangled name" }
+extern void f3 (decltype (foo) *); // { dg-warning "mangled name" "" { target c++14_down } }
+void f4 (decltype (foo) *); // { dg-warning "mangled name" "" { target c++14_down } }
+void f5 (decltype (foo) *) { A; } // { dg-warning "mangled name" "" { target c++14_down } }
+static void f6 (decltype (foo) *) { A; }// { dg-bogus "mangled name" }
+namespace N {
+void f7 (decltype (foo) *) { A; } // { dg-warning "mangled name" "" { target c++14_down } }
+}
+namespace {
+void f8 (decltype (foo) *) { A; } // { dg-bogus "mangled name" }
+}
+void bar ()
+{
+ f3 (foo);
+ f4 (foo);
+ f5 (foo);
+ f6 (foo);
+ N::f7 (foo);
+ f8 (foo);
+}