diff options
author | Neil Booth <neil@gcc.gnu.org> | 2003-04-19 07:41:15 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2003-04-19 07:41:15 +0000 |
commit | f7d151fbe129a06497b605d3191276d58b143fca (patch) | |
tree | 3177e060641cb83199e17ff789e9ed8d27b82d50 /gcc | |
parent | 26aea0737b2d0c4ee328d547555ae25ab5de9a0a (diff) | |
download | gcc-f7d151fbe129a06497b605d3191276d58b143fca.zip gcc-f7d151fbe129a06497b605d3191276d58b143fca.tar.gz gcc-f7d151fbe129a06497b605d3191276d58b143fca.tar.bz2 |
* skip_whitespace: Rearrange to avoid stage1 ICE.
From-SVN: r65809
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cpplex.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 930e887..ce9a8d4 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -334,7 +334,7 @@ skip_whitespace (pfile, c) cppchar_t c; { cpp_buffer *buffer = pfile->buffer; - unsigned int warned = 0; + bool saw_NUL = false; do { @@ -343,13 +343,7 @@ skip_whitespace (pfile, c) ; /* Just \f \v or \0 left. */ else if (c == '\0') - { - if (!warned) - { - cpp_error (pfile, DL_WARNING, "null character(s) ignored"); - warned = 1; - } - } + saw_NUL = true; else if (pfile->state.in_directive && CPP_PEDANTIC (pfile)) cpp_error_with_line (pfile, DL_PEDWARN, pfile->line, CPP_BUF_COL (buffer), @@ -361,6 +355,9 @@ skip_whitespace (pfile, c) /* We only want non-vertical space, i.e. ' ' \t \f \v \0. */ while (is_nvspace (c)); + if (saw_NUL) + cpp_error (pfile, DL_WARNING, "null character(s) ignored"); + buffer->cur--; } |