diff options
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index b62cfcf..dcdfe89 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1,7 +1,7 @@ /* Call-backs for C++ error reporting. This code is non-reentrant. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, - 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, + 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify @@ -27,9 +27,11 @@ along with GCC; see the file COPYING3. If not see #include "toplev.h" #include "flags.h" #include "diagnostic.h" +#include "tree-diagnostic.h" #include "langhooks-def.h" #include "intl.h" #include "cxx-pretty-print.h" +#include "tree-pretty-print.h" #include "pointer-set.h" #define pp_separate_with_comma(PP) pp_cxx_separate_with (PP, ',') @@ -2568,7 +2570,7 @@ cp_print_error_function (diagnostic_context *context, { const char *old_prefix = context->printer->prefix; const char *file = LOCATION_FILE (diagnostic->location); - tree abstract_origin = diagnostic->abstract_origin; + tree abstract_origin = diagnostic_abstract_origin (diagnostic); char *new_prefix = (file && abstract_origin == NULL) ? file_name_as_prefix (file) : NULL; @@ -2926,6 +2928,10 @@ cp_printer (pretty_printer *pp, text_info *text, const char *spec, case 'T': result = type_to_string (next_tree, verbose); break; case 'V': result = cv_to_string (next_tree, verbose); break; + case 'K': + percent_K_format (text); + return true; + default: return false; } |