+2019-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/92695
+ * decl2.c (mark_used): Don't call note_vague_linkage_fn for pure
+ virtual functions, even if they are declared inline.
+
2019-11-16 Jason Merrill <jason@redhat.com>
Implement P1814R0, CTAD for alias templates.
vec_safe_push (no_linkage_decls, decl);
}
- if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl)
- && !DECL_INITIAL (decl) && !DECL_ARTIFICIAL (decl))
+ if (TREE_CODE (decl) == FUNCTION_DECL
+ && DECL_DECLARED_INLINE_P (decl)
+ && !DECL_INITIAL (decl)
+ && !DECL_ARTIFICIAL (decl)
+ && !DECL_PURE_VIRTUAL_P (decl))
/* Remember it, so we can check it was defined. */
note_vague_linkage_fn (decl);
+2019-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/92695
+ * g++.dg/warn/inline3.C: New test.
+
2019-11-27 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/92510
--- /dev/null
+struct S {
+ inline virtual void foo () = 0; // { dg-bogus "used but never defined" }
+#if __cplusplus > 201703L
+ constexpr virtual void bar () = 0; // { dg-bogus "used but never defined" "" { target c++2a } }
+#else
+ inline virtual void bar () = 0; // { dg-bogus "used but never defined" "" { target c++17_down } }
+#endif
+ S () {}
+};
+struct T : public S {
+ inline virtual void foo () {}
+#if __cplusplus > 201703L
+ constexpr virtual void bar () {}
+#else
+ inline virtual void bar () {}
+#endif
+ T () {}
+};
+T t;
+void foo (S *s) { s->foo (); s->bar (); }