PR c++/79304
* error.c (dump_expr) <case COMPONENT_REF>: Don't print .
after ARROW_EXPR.
* g++.dg/diagnostic/pr79304.C: New test.
From-SVN: r245073
+2017-01-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79304
+ * error.c (dump_expr) <case COMPONENT_REF>: Don't print .
+ after ARROW_EXPR.
+
2017-01-31 David Malcolm <dmalcolm@redhat.com>
PR c++/79298
else
{
dump_expr (pp, ob, flags | TFF_EXPR_IN_PARENS);
- pp_cxx_dot (pp);
+ if (TREE_CODE (ob) != ARROW_EXPR)
+ pp_cxx_dot (pp);
}
dump_expr (pp, TREE_OPERAND (t, 1), flags & ~TFF_EXPR_IN_PARENS);
}
+2017-01-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79304
+ * g++.dg/diagnostic/pr79304.C: New test.
+
2017-01-31 David Malcolm <dmalcolm@redhat.com>
PR c++/79298
--- /dev/null
+// PR c++/79304
+// { dg-do compile }
+
+struct C { };
+
+template<class T>
+struct X
+{
+ C* c;
+
+ void f() {
+ this->c.s(); // { dg-error "->c" }
+ }
+};
+
+int main()
+{
+ X<int> x;
+ x.f();
+}