diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-29 04:31:14 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-29 04:31:14 +0000 |
commit | 5ba3700755947a6416e1a609455171e0b8de7767 (patch) | |
tree | b2a0aa8d86d67e1213ffbe961148d1038e5ba877 /gcc/cppexp.c | |
parent | 4e00b6fd23bf82e4038e115609361fb0c62465f7 (diff) | |
download | gcc-5ba3700755947a6416e1a609455171e0b8de7767.tar.gz |
1999-10-28 21:27 -0700 Zack Weinberg <zack@bitmover.com>
* cpplib.h (struct cpp_buffer: fname, nominal_fname,
last_nominal_fname): Mark const.
(struct include_hash: name, nshort, control_macro): Mark
const.
(struct macrodef: symnam): Mark const.
(struct if_stack: fname): Mark const.
(is_idchar, is_idstart, is_hor_space, trigraph_table): Delete.
(IStable): New character-syntax array which encompasses all
the old is_foo arrays.
(is_idchar, is_numchar, is_idstart, is_numstart, is_hspace,
is_space): New macros for interrogating IStable.
(check_macro_name): Kill last argument. All callers changed.
* cppinit.c (initialize_char_syntax): Delete.
(is_idchar, is_idstart, is_hor_space, is_space,
trigraph_table): Delete.
(IStable): New. Initialize with clever macros to avoid
information duplication.
(builtin_array): Table of builtins to get rid of explicit list
in initialize_builtins.
(initialize_builtins): Use builtins_array.
(cpp_start_read): Call init_IStable, and set IStable['$'] if
opts->dollars_in_ident.
* cppexp.c: Change all refs to is_xyz[] arrays to use new
is_xyz() macros.
(cpp_parse_expr): Avoid 'format string is not constant'
warning. Use ISGRAPH to identify printable chars.
* cppfiles.c: Change all refs to is_xyz[] arrays to use new
is_xyz() macros.
(read_and_prescan): Map trigraphs to chars with open-coded
if-else-if-... sequence, not a lookup table.
* cpphash.c: Change all refs to is_xyz[] arrays to use new
is_xyz() macros.
* cpplib.c: Change all refs to is_xyz[] arrays to use new
is_xyz() macros. Kill SKIP_ALL_WHITE_SPACE (unused).
(check_macro_name): Remove ability to report an invalid
assertion name, which is never used.
(do_line): Constify a couple of char *'s.
* cppmain.c (main): Call cpp_cleanup before returning.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30252 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r-- | gcc/cppexp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c index 5d50c75af69..dafbe92e74e 100644 --- a/gcc/cppexp.c +++ b/gcc/cppexp.c @@ -457,12 +457,12 @@ cpp_lex (pfile, skip_evaluation) cpp_skip_hspace (pfile); } - if (!is_idstart[*ip->cur]) + if (!is_idstart(*ip->cur)) goto oops; if (ip->cur[0] == 'L' && (ip->cur[1] == '\'' || ip->cur[1] == '"')) goto oops; tok = ip->cur; - while (is_idchar[*ip->cur]) + while (is_idchar(*ip->cur)) ++ip->cur; len = ip->cur - tok; cpp_skip_hspace (pfile); @@ -1010,11 +1010,11 @@ cpp_parse_expr (pfile) } break; default: - cpp_error (pfile, - (top[1].op >= ' ' && top[1].op <= '~' - ? "unimplemented operator '%c'\n" - : "unimplemented operator '\\%03o'\n"), - top[1].op); + if (ISGRAPH (top[1].op)) + cpp_error (pfile, "unimplemented operator '%c'\n", top[1].op); + else + cpp_error (pfile, "unimplemented operator '\\%03o'\n", + top[1].op); } } if (op.op == 0) |