* error.c (dump_expr): Print type of CONSTRUCTOR.
From-SVN: r182967
This commit is contained in:
parent
458961279a
commit
11a36a2754
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
|
10
gcc/testsuite/g++.dg/cpp0x/error7.C
Normal file
10
gcc/testsuite/g++.dg/cpp0x/error7.C
Normal 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" }
|
||||
}
|
Loading…
Reference in New Issue
Block a user