diff options
author | Zack Weinberg <zack@rabi.phys.columbia.edu> | 1999-02-04 06:36:54 -0500 |
---|---|---|
committer | Dave Brolley <brolley@gcc.gnu.org> | 1999-02-04 06:36:54 -0500 |
commit | 5538ada62ffabf0bd01e583416641137205ff7b7 (patch) | |
tree | f83be6cdafbc1c89d47e5f3cafe7b3c98fd2c0fc /gcc/cpplib.h | |
parent | c20df9e705681bf5ec620c8b887b03c1e0fd45bb (diff) | |
download | gcc-5538ada62ffabf0bd01e583416641137205ff7b7.zip gcc-5538ada62ffabf0bd01e583416641137205ff7b7.tar.gz gcc-5538ada62ffabf0bd01e583416641137205ff7b7.tar.bz2 |
cpplib.c (initialize_char_syntax): Move to cppinit.c.
1999-02-04 14:33 -0500 Zack Weinberg <zack@rabi.phys.columbia.edu>
* cpplib.c (initialize_char_syntax): Move to cppinit.c.
(cpp_define): Remove redundant syntax checks.
(make_assertion): Rename cpp_assert, remove redundant syntax
checks, export.
(cpp_options_init): Don't init things to zero twice.
(cpp_expand_to_buffer): Use memcpy, not a char-by-char loop.
(do_include): Kill excessively verbose import warning that
snuck back in in the gcc2 merge.
(convert_string): Removed.
(do_line): Rewrite with simple last-name-used cache instead of
private hashtable.
(cpp_start_read): Call initialize_char_syntax here, not...
(cpp_reader_init): ...here.
(cpp_handle_options): Support the -std switch.
* cpplib.h (cpp_buffer): Add last_nominal_fname member.
(cpp_options): Add c9x flag.
Declare all the is_* tables and trigraph table here, as const.
Prototype cpp_assert and initialize_char_syntax.
* cppinit.c: New file.
* cppfiles.c (read_and_prescan): Optimize.
* Makefile.in (LIBCPP_OBJS): Add cppinit.o.
From-SVN: r25024
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r-- | gcc/cpplib.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h index bd04192..bd2caf5 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -108,6 +108,8 @@ struct cpp_buffer { char *fname; /* Filename specified with #line command. */ char *nominal_fname; + /* Last filename specified with #line command. */ + char *last_nominal_fname; /* Actual directory of this file, used only for "" includes */ struct file_name_list *actual_dir; @@ -422,6 +424,9 @@ struct cpp_options { /* Nonzero for the 1989 C Standard, including corrigenda and amendments. */ char c89; + /* Nonzero for the 199x C Standard, including corrigenda and amendments. */ + char c9x; + /* Nonzero means give all the error messages the ANSI standard requires. */ char pedantic; @@ -639,10 +644,11 @@ struct definition { } args; }; -extern unsigned char is_idchar[256]; -extern unsigned char is_hor_space[256]; -extern unsigned char is_space[256]; -extern unsigned char trigraph_table[256]; +extern const unsigned char is_idstart[256]; +extern const unsigned char is_idchar[256]; +extern const unsigned char is_hor_space[256]; +extern const unsigned char is_space[256]; +extern const unsigned char trigraph_table[256]; /* Stack of conditionals currently in progress (including both successful and failing conditionals). */ @@ -669,6 +675,7 @@ typedef struct if_stack IF_STACK_FRAME; extern void cpp_buf_line_and_col PARAMS((cpp_buffer *, long *, long *)); extern cpp_buffer* cpp_file_buffer PARAMS((cpp_reader *)); extern void cpp_define PARAMS ((cpp_reader*, unsigned char *)); +extern void cpp_assert PARAMS ((cpp_reader *, unsigned char *)); extern void cpp_error PVPROTO ((cpp_reader *, const char *, ...)) ATTRIBUTE_PRINTF_2; @@ -729,6 +736,9 @@ extern int finclude PROTO ((cpp_reader *, int, extern void deps_output PROTO ((cpp_reader *, char *, int)); extern struct include_hash *include_hash PROTO ((cpp_reader *, char *, int)); +/* cppinit.c */ +extern void initialize_char_syntax PROTO ((int)); + #ifndef INCLUDE_LEN_FUDGE #define INCLUDE_LEN_FUDGE 0 #endif |