diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-04-18 06:43:41 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-04-18 06:43:41 +0000 |
commit | 9cc6e05fdff41972eb9674a50366bceb80389564 (patch) | |
tree | ad222e07bcfa7712f2e45413bd925ca19d2ee513 /gcc/cppexp.c | |
parent | d1bfc5ad4635db1d58d8233f7803b26ba2378647 (diff) | |
download | gcc-9cc6e05fdff41972eb9674a50366bceb80389564.zip gcc-9cc6e05fdff41972eb9674a50366bceb80389564.tar.gz gcc-9cc6e05fdff41972eb9674a50366bceb80389564.tar.bz2 |
cppexp.c (lex): Don't assume tokens are NUL terminated.
* cppexp.c (lex): Don't assume tokens are NUL terminated.
* cpplib.c (do_include, do_import, do_include_next,
read_line_number, detect_if_not_defined): Likewise.
* cpphash.c (collect_expansion): Likewise.
(special_symbol, _cpp_macroexpand): Check return from
cpp_file_buffer.
* cpphash.h (CPP_NUL_TERMINATE, CPP_NUL_TERMINATE_Q): Delete
macros. Delete all uses.
* gcc.dg/cpp-mi.c: Add two more test cases.
* gcc.dg/cpp-mind.h, gcc.dg/cpp-mindp.h: New files.
From-SVN: r33223
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r-- | gcc/cppexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c index 46757c5..237b8e6 100644 --- a/gcc/cppexp.c +++ b/gcc/cppexp.c @@ -444,7 +444,7 @@ lex (pfile, skip_evaluation) return parse_charconst (pfile, tok_start, tok_end); case CPP_NAME: - if (!strcmp (tok_start, "defined")) + if (!strncmp (tok_start, "defined", 7)) return parse_defined (pfile); op.op = INT; |