]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
toplev.c (output_file_directive): Allow for null input_name.
authorAndrew Haley <aph@redhat.com>
Thu, 23 Oct 2003 14:18:14 +0000 (14:18 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Thu, 23 Oct 2003 14:18:14 +0000 (14:18 +0000)
2003-10-22  Andrew Haley  <aph@redhat.com>

* toplev.c (output_file_directive): Allow for null input_name.

From-SVN: r72847

gcc/ChangeLog
gcc/toplev.c

index 1bf13c0e796f7bc29d10b098923f9eb5825d2ff5..0123b86cf4cabade52898baa9566162a8640a4c4 100644 (file)
@@ -1,3 +1,7 @@
+2003-10-22  Andrew Haley  <aph@redhat.com>
+
+       * toplev.c (output_file_directive): Allow for null input_name.
+
 2003-10-22  Waldek Hebisch <hebisch@math.uni.wroc.pl>
 
        * config/i386/i386.c (classify_argument): Handle SET_TYPE.
index 219c69931a5e60dc72b732d1de9509bbd6e89ea8..41b27edd910295cfa19facf1c5a4b0ccad2d9bab 100644 (file)
@@ -1444,8 +1444,14 @@ output_quoted_string (FILE *asm_file, const char *string)
 void
 output_file_directive (FILE *asm_file, const char *input_name)
 {
-  int len = strlen (input_name);
-  const char *na = input_name + len;
+  int len;
+  const char *na;
+  
+  if (input_name == NULL)
+    input_name = "<stdin>";
+
+  len = strlen (input_name);
+  na = input_name + len;
 
   /* NA gets INPUT_NAME sans directory names.  */
   while (na > input_name)