mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-06 02:20:34 +08:00
re PR c++/34275 (Broken diagnostic: 'obj_type_ref' not supported by dump_expr)
PR c++/34275 * error.c (dump_expr): Handle OBJ_TYPE_REF. * g++.dg/other/error20.C: New test. From-SVN: r130533
This commit is contained in:
parent
6aa38454ca
commit
89ab8ba092
@ -1,3 +1,8 @@
|
||||
2007-11-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34275
|
||||
* error.c (dump_expr): Handle OBJ_TYPE_REF.
|
||||
|
||||
2007-11-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34270
|
||||
|
@ -2056,6 +2056,10 @@ dump_expr (tree t, int flags)
|
||||
pp_expression (cxx_pp, t);
|
||||
break;
|
||||
|
||||
case OBJ_TYPE_REF:
|
||||
dump_expr (resolve_virtual_fun_from_obj_type_ref (t), flags);
|
||||
break;
|
||||
|
||||
/* This list is incomplete, but should suffice for now.
|
||||
It is very important that `sorry' does not call
|
||||
`report_error_function'. That could cause an infinite loop. */
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-11-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34275
|
||||
* g++.dg/other/error20.C: New test.
|
||||
|
||||
2007-11-29 Steven G. Kargl <kargls@comcast.net>
|
||||
|
||||
PR fortran/34230
|
||||
|
12
gcc/testsuite/g++.dg/other/error20.C
Normal file
12
gcc/testsuite/g++.dg/other/error20.C
Normal file
@ -0,0 +1,12 @@
|
||||
// PR c++/34275
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{ // { dg-error "candidates" }
|
||||
virtual A foo ();
|
||||
};
|
||||
|
||||
void bar (A& a)
|
||||
{
|
||||
a.foo () = 0; // { dg-error "A::foo\\(\\) = 0" }
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user