Commit 11a36a27 by Jason Merrill Committed by Jason Merrill

* error.c (dump_expr): Print type of CONSTRUCTOR.

From-SVN: r182967
parent 45896127
2012-01-06 Jason Merrill <jason@redhat.com>
* error.c (dump_expr): Print type of CONSTRUCTOR.
2012-01-05 Dodji Seketeli <dodji@redhat.com>
PR c++/51541
......
......@@ -2194,6 +2194,8 @@ dump_expr (tree t, int flags)
}
else
{
if (!BRACE_ENCLOSED_INITIALIZER_P (t))
dump_type (TREE_TYPE (t), 0);
pp_cxx_left_brace (cxx_pp);
dump_expr_init_vec (CONSTRUCTOR_ELTS (t), flags);
pp_cxx_right_brace (cxx_pp);
......
2012-01-06 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/error7.C: New.
2012-01-06 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/deallocate_stat_2.f90: New.
......
// Test for printing the type of T{} in error messages.
// { dg-options -std=c++0x }
template <class T, T t> struct A { };
template <class T> A<T,T{}> f(T t); // { dg-message "T{}" }
int main()
{
f(); // { dg-error "no match" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment