From: Andrew Haley Date: Thu, 23 Oct 2003 14:18:14 +0000 (+0000) Subject: toplev.c (output_file_directive): Allow for null input_name. X-Git-Tag: releases/gcc-3.4.0~2774 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=00503146990fe82f1a2fcb4ee5daee776b27e882;p=thirdparty%2Fgcc.git toplev.c (output_file_directive): Allow for null input_name. 2003-10-22 Andrew Haley * toplev.c (output_file_directive): Allow for null input_name. From-SVN: r72847 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1bf13c0e796f..0123b86cf4ca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-10-22 Andrew Haley + + * toplev.c (output_file_directive): Allow for null input_name. + 2003-10-22 Waldek Hebisch * config/i386/i386.c (classify_argument): Handle SET_TYPE. diff --git a/gcc/toplev.c b/gcc/toplev.c index 219c69931a5e..41b27edd9102 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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 = ""; + + len = strlen (input_name); + na = input_name + len; /* NA gets INPUT_NAME sans directory names. */ while (na > input_name)