diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-10 19:29:20 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-10 19:29:20 +0000 |
commit | ed195be9bc97c0e435374d62e8f02e17f0196159 (patch) | |
tree | f3b430924614b3fbd0ba60c6319d5b379b8108b6 /gcc/cppexp.c | |
parent | c82695ab8762f93e984c2268057a19661245891b (diff) | |
download | gcc-ed195be9bc97c0e435374d62e8f02e17f0196159.tar.gz |
* cppexp.c (lex): Use %.*s to print non-NUL-terminated string.
Make error message friendlier.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33829 138bc75d-0d04-0410-961f-82ee72b054a4
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 00eaea73aa2..7e99292f9a1 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; } |