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/cpplex.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/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 6507e33..1340b9c 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -277,7 +277,6 @@ _cpp_expand_to_buffer (pfile, buf, length) break; } } - CPP_NUL_TERMINATE (pfile); } /* Scan until CPP_BUFFER (PFILE) is exhausted, discarding output. @@ -630,7 +629,6 @@ _cpp_parse_name (pfile, c) if (c == EOF) break; } - CPP_NUL_TERMINATE_Q (pfile); return; } @@ -1124,7 +1122,6 @@ _cpp_lex_token (pfile) FORWARD(1); c2= c; } - CPP_NUL_TERMINATE_Q (pfile); return CPP_NUMBER; case 'b': case 'c': case 'd': case 'h': case 'o': case 'B': case 'C': case 'D': case 'H': case 'O': @@ -1147,14 +1144,12 @@ _cpp_lex_token (pfile) { CPP_RESERVE (pfile, 2); CPP_PUTC_Q (pfile, c); - CPP_NUL_TERMINATE_Q (pfile); return CPP_STRING; } else { FORWARD(-1); chill_number_eof: - CPP_NUL_TERMINATE (pfile); return CPP_NUMBER; } } |