OSDN Git Service

Fix PR c++/43704
[pf3gnuchains/gcc-fork.git] / gcc / cp / error.c
index 28c45f2..b77a94c 100644 (file)
@@ -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, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
+   2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
    This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
@@ -24,14 +24,13 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "cp-tree.h"
+#include "real.h"
 #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, ',')
@@ -481,10 +480,6 @@ dump_type (tree t, int flags)
       pp_cxx_right_paren (cxx_pp);
       break;
 
-    case NULLPTR_TYPE:
-      pp_string (cxx_pp, "std::nullptr_t");
-      break;
-
     default:
       pp_unsupported_tree (cxx_pp, t);
       /* Fall through to error.  */
@@ -713,7 +708,6 @@ dump_type_prefix (tree t, int flags)
     case DECLTYPE_TYPE:
     case TYPE_PACK_EXPANSION:
     case FIXED_POINT_TYPE:
-    case NULLPTR_TYPE:
       dump_type (t, flags);
       pp_base (cxx_pp)->padding = pp_before;
       break;
@@ -816,7 +810,6 @@ dump_type_suffix (tree t, int flags)
     case DECLTYPE_TYPE:
     case TYPE_PACK_EXPANSION:
     case FIXED_POINT_TYPE:
-    case NULLPTR_TYPE:
       break;
 
     default:
@@ -2576,7 +2569,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 (diagnostic);
+      tree abstract_origin = diagnostic->abstract_origin;
       char *new_prefix = (file && abstract_origin == NULL)
                         ? file_name_as_prefix (file) : NULL;
 
@@ -2934,10 +2927,6 @@ 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;
     }