diff options
Diffstat (limited to 'gcc-4.4.0/gcc/cp/error.c')
-rw-r--r-- | gcc-4.4.0/gcc/cp/error.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.4.0/gcc/cp/error.c b/gcc-4.4.0/gcc/cp/error.c index fa43d8835..403dd62e4 100644 --- a/gcc-4.4.0/gcc/cp/error.c +++ b/gcc-4.4.0/gcc/cp/error.c @@ -1090,6 +1090,7 @@ dump_function_decl (tree t, int flags) int show_return = flags & TFF_RETURN_TYPE || flags & TFF_DECL_SPECIFIERS; int do_outer_scope = ! (flags & TFF_UNQUALIFIED_NAME); tree exceptions; + tree orig_decl = t; flags &= ~TFF_UNQUALIFIED_NAME; if (TREE_CODE (t) == TEMPLATE_DECL) @@ -1180,6 +1181,24 @@ dump_function_decl (tree t, int flags) dump_template_bindings (template_parms, template_args); pp_cxx_right_bracket (cxx_pp); } + + /* Uniquely name the different types of constructors and + destructors. The "complete" ctor/dtor type remains undecorated + as these are used in error messages. Use the original decl, + ORIG_DECL, because T could have been set to the generalized + template decl above which drops the ctor/dtor type. */ + if (DECL_DESTRUCTOR_P (orig_decl)) + { + if (DECL_DELETING_DESTRUCTOR_P (orig_decl)) + pp_string (cxx_pp, " (deleting destructor)"); + else if (DECL_BASE_DESTRUCTOR_P (orig_decl)) + pp_string (cxx_pp, " (base destructor)"); + } + else if (DECL_CONSTRUCTOR_P (orig_decl)) + { + if (DECL_BASE_CONSTRUCTOR_P (orig_decl)) + pp_string (cxx_pp, " (base constructor)"); + } } /* Print a parameter list. If this is for a member function, the |