aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-06-13 07:19:22 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-06-13 07:19:22 +0000
commit54925c2087f5f03aa192d1a3bde4faf28e3ffebd (patch)
tree6cb74faf4a4992349f5d239d1c57df1a575c2f3a /gcc
parentff164a61f3fe6097e07d4aaa267f1ce00ebf3844 (diff)
downloadgcc-54925c2087f5f03aa192d1a3bde4faf28e3ffebd.zip
gcc-54925c2087f5f03aa192d1a3bde4faf28e3ffebd.tar.gz
gcc-54925c2087f5f03aa192d1a3bde4faf28e3ffebd.tar.bz2
cpplib.c (handle_directive): Print non-NUL-terminated string with %.*s.
* cpplib.c (handle_directive): Print non-NUL-terminated string with %.*s. From-SVN: r34514
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cpplib.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 523a073..2bddaa3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-13 Zack Weinberg <zack@wolery.cumb.org>
+
+ * cpplib.c (handle_directive): Print non-NUL-terminated string
+ with %.*s.
+
2000-06-12 Michael Meissner <meissner@redhat.com>
* ifcvt.c (dead_or_predicable): Don't do conditional execution
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 60dfbdd..fd98f41 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -244,7 +244,8 @@ _cpp_handle_directive (pfile)
assembler pseudo-ops. Don't complain about invalid directives
in skipped conditional groups (6.10 p4). */
if (!pfile->skipping && !CPP_OPTION (pfile, lang_asm))
- cpp_error (pfile, "invalid preprocessing directive #%s", ident);
+ cpp_error (pfile, "invalid preprocessing directive #%.*s",
+ (int) len, ident);
return 0;
}
/* And anything else means the # wasn't a directive marker. */