aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-objc-common.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
committerIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
commite252b51ccde010cbd2a146485d8045103cd99533 (patch)
treee060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/c/c-objc-common.c
parentf10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff)
parent104c05c5284b7822d770ee51a7d91946c7e56d50 (diff)
downloadgcc-e252b51ccde010cbd2a146485d8045103cd99533.zip
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/c/c-objc-common.c')
-rw-r--r--gcc/c/c-objc-common.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/gcc/c/c-objc-common.c b/gcc/c/c-objc-common.c
index a68249d..cdb2242 100644
--- a/gcc/c/c-objc-common.c
+++ b/gcc/c/c-objc-common.c
@@ -185,6 +185,12 @@ get_aka_type (tree type)
static void
print_type (c_pretty_printer *cpp, tree t, bool *quoted)
{
+ if (t == error_mark_node)
+ {
+ pp_string (cpp, _("{erroneous}"));
+ return;
+ }
+
gcc_assert (TYPE_P (t));
struct obstack *ob = pp_buffer (cpp)->obstack;
char *p = (char *) obstack_base (ob);
@@ -241,8 +247,6 @@ print_type (c_pretty_printer *cpp, tree t, bool *quoted)
%D: a general decl,
%E: an identifier or expression,
%F: a function declaration,
- %G: a Gimple statement,
- %K: a CALL_EXPR,
%T: a type.
%V: a list of type qualifiers from a tree.
%v: an explicit list of type qualifiers
@@ -263,19 +267,6 @@ c_tree_printer (pretty_printer *pp, text_info *text, const char *spec,
if (precision != 0 || wide)
return false;
- if (*spec == 'G')
- {
- percent_G_format (text);
- return true;
- }
-
- if (*spec == 'K')
- {
- t = va_arg (*text->args_ptr, tree);
- percent_K_format (text, EXPR_LOCATION (t), TREE_BLOCK (t));
- return true;
- }
-
if (*spec != 'v')
{
t = va_arg (*text->args_ptr, tree);