summaryrefslogtreecommitdiff
path: root/gcc/pretty-print.h
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-04 12:23:50 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-04 12:23:50 +0000
commit27746e01e73b4caa0b4c6237ce6f21c8c5c1eb6c (patch)
treef7e08408fe3883d28eb96bdfd6745551e07b82a0 /gcc/pretty-print.h
parent97d4c6a6f9fc5abb5e0751c9aec6e939b849bdbe (diff)
downloadgcc-27746e01e73b4caa0b4c6237ce6f21c8c5c1eb6c.tar.gz
* intl.c (locale_encoding, locale_utf8): New.
(gcc_init_libintl): Initialize locale_encoding and locale_utf8. * intl.h (locale_encoding, locale_utf8): Declare. * pretty-print.c: Include ggc.h. Include iconv.h if HAVE_ICONV. (pp_base_tree_identifier, decode_utf8_char, identifier_to_locale): New. * pretty-print.h (pp_identifier): Call identifier_to_locale on ID argument. (pp_tree_identifier): Define to call pp_base_tree_identifier. (pp_base_tree_identifier): Declare as function. (identifier_to_locale): Declare. * Makefile.in (pretty-print.o): Update dependencies. * varasm.c (finish_aliases_1): Use %qE for identifiers in diagnostics. testsuite: * gcc.dg/attr-alias-5.c, gcc.dg/ucnid-7.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147096 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/pretty-print.h')
-rw-r--r--gcc/pretty-print.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h
index dd3f0c0ad39..58292259604 100644
--- a/gcc/pretty-print.h
+++ b/gcc/pretty-print.h
@@ -273,10 +273,9 @@ struct pretty_print_info
pp_scalar (PP, HOST_WIDEST_INT_PRINT_DEC, (HOST_WIDEST_INT) I)
#define pp_pointer(PP, P) pp_scalar (PP, "%p", P)
-#define pp_identifier(PP, ID) pp_string (PP, ID)
+#define pp_identifier(PP, ID) pp_string (PP, identifier_to_locale (ID))
#define pp_tree_identifier(PP, T) \
- pp_append_text(PP, IDENTIFIER_POINTER (T), \
- IDENTIFIER_POINTER (T) + IDENTIFIER_LENGTH (T))
+ pp_base_tree_identifier (pp_base (PP), T)
#define pp_unsupported_tree(PP, T) \
pp_verbatim (pp_base (PP), "#%qs not supported by %s#", \
@@ -322,6 +321,7 @@ extern void pp_base_character (pretty_printer *, int);
extern void pp_base_string (pretty_printer *, const char *);
extern void pp_write_text_to_stream (pretty_printer *pp);
extern void pp_base_maybe_space (pretty_printer *);
+extern void pp_base_tree_identifier (pretty_printer *, tree);
/* Switch into verbatim mode and return the old mode. */
static inline pp_wrapping_mode_t
@@ -334,4 +334,6 @@ pp_set_verbatim_wrapping_ (pretty_printer *pp)
}
#define pp_set_verbatim_wrapping(PP) pp_set_verbatim_wrapping_ (pp_base (PP))
+extern const char *identifier_to_locale (const char *);
+
#endif /* GCC_PRETTY_PRINT_H */