Fix specs file problem reported by Nathan Myers.
authorJim Wilson <wilson@cygnus.com>
Thu, 7 May 1998 20:49:41 +0000 (20:49 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 7 May 1998 20:49:41 +0000 (13:49 -0700)
* gcc.c (read_specs): Handle missing blank line at end of specs file.

From-SVN: r19622

gcc/ChangeLog
gcc/gcc.c

index edb021d5ff63e413e8411ceb63bcbf61c48a66c8..6b2d9750d31d7f1158d1c440c5ceb109b41e012e 100644 (file)
@@ -1,5 +1,7 @@
 Thu May  7 19:26:34 1998  Jim Wilson  <wilson@cygnus.com>
 
+       * gcc.c (read_specs): Handle missing blank line at end of specs file.
+
        * i386.md (movsicc, movhicc, movsicc_1, movhicc_1, movsfcc_1,
        movdfcc_1): Disable.
 
index 1941aed2751d7dff8abae731def47436c80b5556..f2efe5694345c7dc682d0da50be37d324a640d37 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1557,8 +1557,8 @@ read_specs (filename, main_p)
        fatal ("specs file malformed after %d characters", p - buffer);
 
       p1 = p;
-      /* Find next blank line.  */
-      while (*p1 && !(*p1 == '\n' && p1[1] == '\n'))
+      /* Find next blank line or end of string.  */
+      while (*p1 && !(*p1 == '\n' && (p1[1] == '\n' || p1[1] == '\0')))
        p1++;
 
       /* Specs end at the blank line and do not include the newline.  */