This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ patch] tweak diagnostic formatting
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Dec 2001 11:53:05 +0000
- Subject: [C++ patch] tweak diagnostic formatting
- Organization: Codesourcery LLC
Hi,
I've installed this tweak to the error formatting machinery. Needed for
up coming 2645 fix, and it seems a good thing anyway.
built & tested on i686-pc-linux-gnu.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_new_method_call): Use '%#V'.
* error.c (cv_to_string): Use V parameter to determine padding.
Index: cp/call.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/call.c,v
retrieving revision 1.298
diff -c -3 -p -r1.298 call.c
*** call.c 2001/12/18 09:36:01 1.298
--- call.c 2001/12/18 11:49:53
*************** build_new_method_call (instance, name, a
*** 4625,4633 ****
if (!COMPLETE_TYPE_P (basetype))
incomplete_type_error (instance_ptr, basetype);
else
! error ("no matching function for call to `%T::%D(%A)%V'",
! basetype, pretty_name, user_args,
! TREE_TYPE (TREE_TYPE (instance_ptr)));
print_z_candidates (candidates);
return error_mark_node;
}
--- 4625,4633 ----
if (!COMPLETE_TYPE_P (basetype))
incomplete_type_error (instance_ptr, basetype);
else
! error ("no matching function for call to `%T::%D(%A)%#V'",
! basetype, pretty_name, user_args,
! TREE_TYPE (TREE_TYPE (instance_ptr)));
print_z_candidates (candidates);
return error_mark_node;
}
Index: cp/error.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/error.c,v
retrieving revision 1.164
diff -c -3 -p -r1.164 error.c
*** error.c 2001/12/18 03:35:30 1.164
--- error.c 2001/12/18 11:49:54
*************** args_to_string (p, verbose)
*** 2388,2398 ****
static const char *
cv_to_string (p, v)
tree p;
! int v ATTRIBUTE_UNUSED;
{
reinit_global_formatting_buffer ();
! dump_qualifiers (p, before);
return output_finalize_message (scratch_buffer);
}
--- 2388,2398 ----
static const char *
cv_to_string (p, v)
tree p;
! int v;
{
reinit_global_formatting_buffer ();
! dump_qualifiers (p, v ? before : none);
return output_finalize_message (scratch_buffer);
}