diff options
author | Jing Yu <jingyu@google.com> | 2010-01-18 13:38:25 -0800 |
---|---|---|
committer | Jing Yu <jingyu@google.com> | 2010-01-18 13:38:25 -0800 |
commit | 30f553f6a7597e8084704b84876dea2af493d6fe (patch) | |
tree | 569579768afd83d884f5f1118272fea213afdb36 /gcc-4.4.0/gcc/cp/error.c | |
parent | 727407e24af9df776e77f6a5762a62869198bc09 (diff) | |
download | toolchain_gcc-30f553f6a7597e8084704b84876dea2af493d6fe.tar.gz toolchain_gcc-30f553f6a7597e8084704b84876dea2af493d6fe.tar.bz2 toolchain_gcc-30f553f6a7597e8084704b84876dea2af493d6fe.zip |
Bring gcc-4.4.0 to up-to-date.
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 |