diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-05-10 19:29:20 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-05-10 19:29:20 +0000 |
commit | e43a157747ca2a71a4a55c16b2bc6299e9a636c8 (patch) | |
tree | f3b430924614b3fbd0ba60c6319d5b379b8108b6 /gcc/cppexp.c | |
parent | fa5572714eed920f6d162a1d7ab08d990926ba83 (diff) | |
download | gcc-e43a157747ca2a71a4a55c16b2bc6299e9a636c8.zip gcc-e43a157747ca2a71a4a55c16b2bc6299e9a636c8.tar.gz gcc-e43a157747ca2a71a4a55c16b2bc6299e9a636c8.tar.bz2 |
cppexp.c (lex): Use %.*s to print non-NUL-terminated string.
* cppexp.c (lex): Use %.*s to print non-NUL-terminated string.
Make error message friendlier.
From-SVN: r33829
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r-- | gcc/cppexp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c index 00eaea7..7e99292 100644 --- a/gcc/cppexp.c +++ b/gcc/cppexp.c @@ -466,8 +466,8 @@ lex (pfile, skip_evaluation) && tok_start[1] == toktab->operator[1]) break; if (toktab->token == ERROR) - cpp_error (pfile, "'%s' not allowed in operand of #if", - tok_start); + cpp_error (pfile, "'%.*s' is not allowed in #if expressions", + (int) (tok_end - tok_start), tok_start); op.op = toktab->token; return op; } |