summaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-19 05:40:08 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-19 05:40:08 +0000
commit9c343313ea14c543785f41b5f43e10e530f87d07 (patch)
tree3c3d821dfd3b04ed9aaf9b7fbdf7297ca8b32a1f /gcc/cpphash.h
parent770eb97707cc9f2454a4d2102b79b61ef5bba5c8 (diff)
downloadgcc-9c343313ea14c543785f41b5f43e10e530f87d07.tar.gz
* cpphash.h (struct cpp_reader): Make date and time strings.
(_cpp_builtin_macro_text, _cpp_copy_replacement_text, _cpp_replacement_text_len): New. * cppinit.c (cpp_create_reader): Update. (init_builtins): Register appropriate builtins for -traditional-cpp. * cppmacro.c (new_number_token): Remove. (_cpp_builtin_macro_text): New. (builtin_macro): Use it. (cpp_macro_definition): Update to handle traditional macros. * cppmain.c (cb_line_change): Don't do column positioning for traditional output. * cpptrad.c (enum ls): Rename ls_fun_macro to ls_fun_open. New state ls_fun_close. (skip_whitespace): Fix. (maybe_start_funlike): Don't set state.parsing_args. (scan_out_logical_line): Remove duplicate error. Use lex_state rather than state.parsing_args. (push_replacement_text): Handle builtins. (_cpp_replacement_text_len, _cpp_copy_replacement_text): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54771 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index 98dfb49ca7c..ee9a47effc4 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -370,9 +370,9 @@ struct cpp_reader
for include files. (Altered as we get more of them.) */
unsigned int max_include_len;
- /* Date and time tokens. Calculated together if either is requested. */
- cpp_token date;
- cpp_token time;
+ /* Date and time text. Calculated together if either is requested. */
+ const uchar *date;
+ const uchar *time;
/* EOF token, and a token forcing paste avoidance. */
cpp_token avoid_paste;
@@ -475,7 +475,8 @@ extern bool _cpp_save_parameter PARAMS ((cpp_reader *, cpp_macro *,
extern bool _cpp_arguments_ok PARAMS ((cpp_reader *, cpp_macro *,
const cpp_hashnode *,
unsigned int));
-
+extern const uchar *_cpp_builtin_macro_text PARAMS ((cpp_reader *,
+ cpp_hashnode *));
/* In cpphash.c */
extern void _cpp_init_hashtable PARAMS ((cpp_reader *, hash_table *));
extern void _cpp_destroy_hashtable PARAMS ((cpp_reader *));
@@ -532,6 +533,8 @@ extern void _cpp_set_trad_context PARAMS ((cpp_reader *));
extern bool _cpp_create_trad_definition PARAMS ((cpp_reader *, cpp_macro *));
extern bool _cpp_expansions_different_trad PARAMS ((const cpp_macro *,
const cpp_macro *));
+extern uchar *_cpp_copy_replacement_text PARAMS ((const cpp_macro *, uchar *));
+extern size_t _cpp_replacement_text_len PARAMS ((const cpp_macro *));
/* Utility routines and macros. */
#define DSC(str) (const uchar *)str, sizeof str - 1