This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Small C++ PATCH to dump_function_name


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, '~');

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]