diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-05-03 15:35:47 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-05-03 15:35:47 +0000 |
commit | 1920de4701bceb07cea0b0c657c35577b8e47dde (patch) | |
tree | b0329a13f3ba6a807cb4b7e6f276a6ec83f5d34f /gcc/cpplib.c | |
parent | 32919a0dd2047067e8586102a3a248ad9fb270e9 (diff) | |
download | gcc-1920de4701bceb07cea0b0c657c35577b8e47dde.zip gcc-1920de4701bceb07cea0b0c657c35577b8e47dde.tar.gz gcc-1920de4701bceb07cea0b0c657c35577b8e47dde.tar.bz2 |
cpplib.h: Add accessor macros for token lists.
* cpplib.h: Add accessor macros for token lists.
* cpplib.c, cpphash.c, cpplex.c: Use them.
From-SVN: r33630
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r-- | gcc/cpplib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index f96da23..baaeed6 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -349,21 +349,21 @@ do_define (pfile) /* First token on the line must be a NAME. There must be at least one token (the VSPACE at the end). */ - if (list->tokens[0].type != CPP_NAME) + if (TOK_TYPE (list, 0) != CPP_NAME) { - cpp_error_with_line (pfile, list->line, list->tokens[0].col, + cpp_error_with_line (pfile, list->line, TOK_COL (list, 0), "#define must be followed by an identifier"); goto out; } - sym = list->namebuf + list->tokens[0].val.name.offset; - len = list->tokens[0].val.name.len; + sym = TOK_NAME (list, 0); + len = TOK_LEN (list, 0); /* That NAME is not allowed to be "defined". (Not clear if the standard requires this.) */ if (len == 7 && !strncmp (sym, "defined", 7)) { - cpp_error_with_line (pfile, list->line, list->tokens[0].col, + cpp_error_with_line (pfile, list->line, TOK_COL (list, 0), "\"defined\" is not a legal macro name"); goto out; } |