OSDN Git Service

* cpplib.c (do_pragma_dependency): Tidy warning messages.
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jul 2000 08:55:21 +0000 (08:55 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jul 2000 08:55:21 +0000 (08:55 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35033 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cpplib.c

index 48edf86..acb6d67 100644 (file)
@@ -1,3 +1,7 @@
+2000-07-14  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cpplib.c (do_pragma_dependency): Tidy warning messages.
+
 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
 
        * .cvsignore: Correct typo.
index 565c513..e55f955 100644 (file)
@@ -879,8 +879,8 @@ do_pragma_dependency (pfile)
     {
       const cpp_token *msg = _cpp_get_token (pfile);
       
-      cpp_warning (pfile, "current file is older than %c%s%c",
-                  left, name, right);
+      cpp_warning (pfile, "current file is older than %c%.*s%c",
+                  left, (int)len, name, right);
       if (msg->type != CPP_EOF)
        {
          U_CHAR *text, *limit;
@@ -889,6 +889,9 @@ do_pragma_dependency (pfile)
          _cpp_dump_list (pfile, &pfile->token_list, msg, 0);
          limit = pfile->limit;
          pfile->limit = text;
+         while (*text == ' ')
+           /* There must be something non-whitespace after. */
+           text++; 
          cpp_warning (pfile, "%.*s", (int)(limit - text), text);
        }
     }