]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/pretty-print.h
intl.c (locale_encoding, [...]): New.
[thirdparty/gcc.git] / gcc / pretty-print.h
index dd3f0c0ad3909f8cd2196c1aadcdf59da45bd84c..5829225960497b97e91cb7434204c746f767fed2 100644 (file)
@@ -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 */