summaryrefslogtreecommitdiff
path: root/gcc/c-objc-common.c
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-01 22:22:57 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-01 22:22:57 +0000
commit9e169c4bf36a38689550c059570c57efbf00a6fb (patch)
tree95e6800f7ac2a49ff7f799d96f04172320e70ac0 /gcc/c-objc-common.c
parent6170dfb6edfb7b19f8ae5209b8f948fe0076a4ad (diff)
downloadgcc-vect256.tar.gz
Merged trunk at revision 161680 into branch.vect256
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/vect256@161681 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-objc-common.c')
-rw-r--r--gcc/c-objc-common.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c
index fccc2635fa8..d1cac99d562 100644
--- a/gcc/c-objc-common.c
+++ b/gcc/c-objc-common.c
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "c-tree.h"
#include "intl.h"
-#include "c-pretty-print.h"
+#include "c-family/c-pretty-print.h"
#include "flags.h"
#include "diagnostic.h"
#include "tree-pretty-print.h"
@@ -79,21 +79,22 @@ c_objc_common_init (void)
%E: an identifier or expression,
%F: a function declaration,
%T: a type.
+ %V: a list of type qualifiers from a tree.
+ %v: an explicit list of type qualifiers
+ %#v: an explicit list of type qualifiers of a function type.
- These format specifiers form a subset of the format specifiers set used
- by the C++ front-end.
Please notice when called, the `%' part was already skipped by the
diagnostic machinery. */
static bool
c_tree_printer (pretty_printer *pp, text_info *text, const char *spec,
int precision, bool wide, bool set_locus, bool hash)
{
- tree t;
+ tree t = NULL_TREE;
tree name;
c_pretty_printer *cpp = (c_pretty_printer *) pp;
pp->padding = pp_none;
- if (precision != 0 || wide || hash)
+ if (precision != 0 || wide)
return false;
if (*spec == 'K')
@@ -102,10 +103,12 @@ c_tree_printer (pretty_printer *pp, text_info *text, const char *spec,
return true;
}
- t = va_arg (*text->args_ptr, tree);
-
- if (set_locus && text->locus)
- *text->locus = DECL_SOURCE_LOCATION (t);
+ if (*spec != 'v')
+ {
+ t = va_arg (*text->args_ptr, tree);
+ if (set_locus && text->locus)
+ *text->locus = DECL_SOURCE_LOCATION (t);
+ }
switch (*spec)
{
@@ -155,6 +158,14 @@ c_tree_printer (pretty_printer *pp, text_info *text, const char *spec,
pp_expression (cpp, t);
return true;
+ case 'V':
+ pp_c_type_qualifier_list (cpp, t);
+ return true;
+
+ case 'v':
+ pp_c_cv_qualifiers (cpp, va_arg (*text->args_ptr, int), hash);
+ return true;
+
default:
return false;
}