* class.c (build_base_path): If want_pointer, call mark_rvalue_use
on expr.
* g++.dg/warn/Wunused-var-14.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161511
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-06-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/44682
+ * class.c (build_base_path): If want_pointer, call mark_rvalue_use
+ on expr.
+
2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
* init.c: Do not include except.h.
if (!want_pointer)
/* This must happen before the call to save_expr. */
expr = cp_build_unary_op (ADDR_EXPR, expr, 0, tf_warning_or_error);
+ else
+ mark_rvalue_use (expr);
offset = BINFO_OFFSET (binfo);
fixed_type_p = resolves_to_fixed_type_p (expr, &nonnull);
+2010-06-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/44682
+ * g++.dg/warn/Wunused-var-14.C: New test.
+
2010-06-28 Tobias Burnus <burnus@net-b.de>
PR fortran/43298
--- /dev/null
+// PR c++/44682
+// { dg-do compile }
+// { dg-options "-Wunused" }
+
+struct S { virtual ~S () {} };
+struct T { virtual ~T () {} };
+struct U : S, T {};
+
+void f (U &);
+
+void
+g (void *v)
+{
+ T *t = static_cast <T *> (v);
+ U *u = static_cast <U *> (t);
+ f (*u);
+}