diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-18 18:43:05 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-18 18:43:05 +0000 |
commit | 338fa5f7e849dc59c8b9ac8c44d0207355537d75 (patch) | |
tree | 46f9c8a95640d0cd590d2e287982ab8e1099e35e /gcc/cpphash.h | |
parent | 7a5f56a528abe492ff210f1d7701be4166e1d458 (diff) | |
download | gcc-338fa5f7e849dc59c8b9ac8c44d0207355537d75.tar.gz |
* cpphash.h (HASHSTEP): Take character rather than pointer
to character.
(_cpp_check_directive, _cpp_check_linemarker): Update prototypes.
* cpphash.c (cpp_loookup): Update for new HASHSTEP.
* cpplex.c (auto_expand_name_space, trigraph_replace,
backslash_start, handle_newline, parse_name, INIT_TOKEN_STR,
IMMED_TOKEN, PREV_TOKEN_TYPE, PUSH_TOKEN, REVISE_TOKEN,
BACKUP_TOKEN, BACKUP_TRIGRAPH, MIGHT_BE_DIRECTIVE,
KNOWN_DIRECTIVE): Delete.
(handle_newline, check_long_token, skip_escaped_newlines,
unterminated): New functions.
(ACCEPT_CHAR, SAVE_STATE, RESTORE_STATE): New macros.
(parse_identifier): Was parse_name, new implementation.
(skip_line_comment, skip_block_comment, skip_whitespace,
parse_number, parse_string, trigraph_ok, save_comment,
adjust_column, _cpp_get_line): New implementations.
(lex_token): New function. Lexes a token at a time, looking
forwards. Contains most of the guts of the old lex_line.
(lex_line): New implementation, using lex_token to obtain
individual tokens.
(cpp_scan_buffer): Use the token's line, not the list's line.
* cpplib.c (_cpp_check_directive, _cpp_check_linemarker):
New implementations.
(do_assert): Don't bother setting the answer's list's line.
(cpp_push_buffer): Initialise new pfile and read_ahead members
of struct cpp_buffer.
* cpplib.h (cppchar_t): New typedef.
(struct cpp_buffer): read_ahead, pfile and col_adjust are
new members.
(struct lexer_state): New structure that determines the state
and behaviour of the lexer.
(IN_DIRECTIVE, KNOWN_DIRECTIVE): New macros.
(struct cpp_reader): New member "state". Rename
multiline_string_line and multiline_string_column. Delete
col_adjust, in_lex_line members.
(CPP_BUF_COLUMN): Update.
* gcc.dg/cpp/cmdlne-C.c: Remove bogus warning test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36509 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 41d5b9e5a7f..08d3209d7bc 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -211,7 +211,7 @@ extern unsigned char _cpp_trigraph_map[UCHAR_MAX + 1]; /* Hash step. The hash calculation is duplicated in cpp_lookup and parse_name. */ -#define HASHSTEP(r, str) ((r) * 67 + (*str - 113)); +#define HASHSTEP(r, c) ((r) * 67 + (c - 113)); /* Flags for _cpp_init_toklist. */ #define DUMMY_TOKEN 0 @@ -280,9 +280,9 @@ extern const cpp_token *_cpp_glue_header_name PARAMS ((cpp_reader *)); /* In cpplib.c */ extern const struct directive *_cpp_check_directive - PARAMS ((cpp_reader *, const cpp_token *, int)); + PARAMS ((cpp_reader *, const cpp_token *)); extern const struct directive *_cpp_check_linemarker - PARAMS ((cpp_reader *, const cpp_token *, int)); + PARAMS ((cpp_reader *, const cpp_token *)); extern cpp_hashnode *_cpp_parse_assertion PARAMS ((cpp_reader *, struct answer **)); extern struct answer **_cpp_find_answer PARAMS ((cpp_hashnode *, |