This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Small C++ PATCH to dump_function_name
- To: gcc-patches at gcc dot gnu dot org
- Subject: Small C++ PATCH to dump_function_name
- From: Jason Merrill <jason at redhat dot com>
- Date: 09 Dec 2000 00:19:03 +0000
Avoiding error messages like
wa.ii:7: `A::__comp_ctor(const A&)' is private
2000-12-08 Jason Merrill <jason@redhat.com>
* error.c (dump_function_name): Don't let the user see __comp_ctor.
*** error.c.~1~ Fri Dec 8 21:17:30 2000
--- error.c Fri Dec 8 21:17:34 2000
*************** dump_function_name (t, flags)
*** 1340,1345 ****
--- 1340,1350 ----
{
tree name = DECL_NAME (t);
+ /* Don't let the user see __comp_ctor et al. */
+ if (DECL_CONSTRUCTOR_P (t)
+ || DECL_DESTRUCTOR_P (t))
+ name = constructor_name (DECL_CONTEXT (t));
+
if (DECL_DESTRUCTOR_P (t))
{
output_add_character (scratch_buffer, '~');