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

From-SVN: r182967
This commit is contained in:
Jason Merrill 2012-01-06 16:39:19 -05:00 committed by Jason Merrill
parent 458961279a
commit 11a36a2754
4 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -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);

View File

@ -1,3 +1,7 @@
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.

View File

@ -0,0 +1,10 @@
// 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" }
}