cpplib.c (handle_directive): Print non-NUL-terminated string with %.*s.
authorZack Weinberg <zack@wolery.cumb.org>
Tue, 13 Jun 2000 07:19:22 +0000 (07:19 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Tue, 13 Jun 2000 07:19:22 +0000 (07:19 +0000)
* cpplib.c (handle_directive): Print non-NUL-terminated string
with %.*s.

From-SVN: r34514

gcc/ChangeLog
gcc/cpplib.c

index 523a073..2bddaa3 100644 (file)
@@ -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
index 60dfbdd..fd98f41 100644 (file)
@@ -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.   */