diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2002-06-29 15:49:24 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-06-29 15:49:24 +0000 |
commit | 38800fe8762fe73e24dc6b38d31c417cf6cf2dab (patch) | |
tree | 5012071de47f151457ce8f04c1ce2d831f8f3912 /gcc/cppmain.c | |
parent | f60ed6be98bde80360b8a61e40ca3d5774f0ea49 (diff) | |
download | gcc-38800fe8762fe73e24dc6b38d31c417cf6cf2dab.zip gcc-38800fe8762fe73e24dc6b38d31c417cf6cf2dab.tar.gz gcc-38800fe8762fe73e24dc6b38d31c417cf6cf2dab.tar.bz2 |
re PR preprocessor/7150 (gcc -dM -E ... SegFault)
PR preprocessor/7150
* cppmain.c (scan_translation_unit_trad): Simplify.
* cpplib.c (cpp_scan_nooutput): Handle traditional case.
From-SVN: r55102
Diffstat (limited to 'gcc/cppmain.c')
-rw-r--r-- | gcc/cppmain.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/cppmain.c b/gcc/cppmain.c index dba6404..e600295 100644 --- a/gcc/cppmain.c +++ b/gcc/cppmain.c @@ -228,13 +228,9 @@ static void scan_translation_unit_trad (pfile) cpp_reader *pfile; { - for (;;) + while (_cpp_read_logical_line_trad (pfile)) { - size_t len; - - if (!_cpp_read_logical_line_trad (pfile)) - break; - len = pfile->out.cur - pfile->out.base; + size_t len = pfile->out.cur - pfile->out.base; maybe_print_line (print.map, pfile->out.first_line); fwrite (pfile->out.base, 1, len, print.outf); print.printed = 1; |