diff options
author | Paul Eggert <eggert@gnu.org> | 1993-09-28 00:23:58 +0000 |
---|---|---|
committer | Paul Eggert <eggert@gnu.org> | 1993-09-28 00:23:58 +0000 |
commit | 7b1e82724a9f2abc47f52b5898ccd8b02ea2dd30 (patch) | |
tree | 83a86d9e83d06424fd2fb415b739788a6e2b6f2d | |
parent | 73e2c65036612b9886b57d974b49de4507df06db (diff) | |
download | gcc-7b1e82724a9f2abc47f52b5898ccd8b02ea2dd30.zip gcc-7b1e82724a9f2abc47f52b5898ccd8b02ea2dd30.tar.gz gcc-7b1e82724a9f2abc47f52b5898ccd8b02ea2dd30.tar.bz2 |
(ASM_FILE_START): Quote special characters in file names.
From-SVN: r5497
-rw-r--r-- | gcc/config/a29k/a29k.h | 4 | ||||
-rw-r--r-- | gcc/config/a29k/unix.h | 4 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.h | 4 | ||||
-rw-r--r-- | gcc/config/i386/aix386ng.h | 4 | ||||
-rw-r--r-- | gcc/config/i386/bsd.h | 5 | ||||
-rw-r--r-- | gcc/config/i386/gas.h | 16 | ||||
-rw-r--r-- | gcc/config/i386/sun386.h | 4 |
7 files changed, 23 insertions, 18 deletions
diff --git a/gcc/config/a29k/a29k.h b/gcc/config/a29k/a29k.h index 95656cc..640ad2d 100644 --- a/gcc/config/a29k/a29k.h +++ b/gcc/config/a29k/a29k.h @@ -1311,7 +1311,9 @@ extern char *a29k_function_name; for (p = main_input_filename; *p; p++) \ if (*p == '/') \ after_dir = p + 1; \ - fprintf (FILE, "\t.file \"%s\"\n", after_dir); \ + fprintf (FILE, "\t.file "); \ + output_quoted_string (FILE, after_dir); \ + fprintf (FILE, "\n"); \ fprintf (FILE, "\t.sect .lit,lit\n"); } /* Output to assembler file text saying following lines diff --git a/gcc/config/a29k/unix.h b/gcc/config/a29k/unix.h index e135b48..ca77015 100644 --- a/gcc/config/a29k/unix.h +++ b/gcc/config/a29k/unix.h @@ -61,7 +61,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ for (p = main_input_filename; *p; p++) \ if (*p == '/') \ after_dir = p + 1; \ - fprintf (FILE, "\t.file \"%s\"\n", after_dir); \ + fprintf (FILE, "\t.file "); \ + output_quoted_string (FILE, after_dir); \ + fprintf (FILE, "\n"); \ if (flag_shared_data) \ fprintf (FILE, "\t.sect .shdata,data\n"); \ fprintf (FILE, "\t.sect .lit,lit\n"); } diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 1758919..4e63134 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -1354,7 +1354,9 @@ extern char *current_function_name; for (p = main_input_filename; *p; p++) \ if (*p == '/') \ after_dir = p + 1; \ - fprintf (FILE, "\n\t.file 2 \"%s\"\n", after_dir); \ + fprintf (FILE, "\n\t.file 2 "); \ + output_quoted_string (FILE, after_dir); \ + fprintf (FILE, "\n"); \ } /* Output to assembler file text saying following lines diff --git a/gcc/config/i386/aix386ng.h b/gcc/config/i386/aix386ng.h index 6eecde8..16d6875 100644 --- a/gcc/config/i386/aix386ng.h +++ b/gcc/config/i386/aix386ng.h @@ -57,7 +57,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #undef ASM_FILE_START #define ASM_FILE_START(FILE) \ - do { fprintf (FILE, "\t.file\t\"%s\"\n", dump_base_name); \ + do { fprintf (FILE, "\t.file\t"); \ + output_quoted_string (FILE, dump_base_name); \ + fprintf (FILE, "\n"); \ if (optimize) \ ASM_FILE_START_1 (FILE); \ else \ diff --git a/gcc/config/i386/bsd.h b/gcc/config/i386/bsd.h index 164290c..c0f8d9d 100644 --- a/gcc/config/i386/bsd.h +++ b/gcc/config/i386/bsd.h @@ -48,7 +48,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ??? I am skeptical of this -- RMS. */ #define ASM_FILE_START(FILE) \ - fprintf (FILE, "\t.file\t\"%s\"\n", dump_base_name); + do { fprintf (FILE, "\t.file\t"); \ + output_quoted_string (FILE, dump_base_name); \ + fprintf (FILE, "\n"); \ + } while (0) /* This was suggested, but it shouldn't be right for DBX output. -- RMS #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */ diff --git a/gcc/config/i386/gas.h b/gcc/config/i386/gas.h index cad9f51..7dc3da0 100644 --- a/gcc/config/i386/gas.h +++ b/gcc/config/i386/gas.h @@ -93,19 +93,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ fprintf ((FILE), "\t.align 2,0x90\n"); /* Use log of 4 as arg. */ #undef ASM_FILE_START -/* ASM_FILE_START(FILE) used to be defined as: - fprintf (FILE, "\t.file\t\"%s\"\n", dump_base_name); - However, the string dump_base_name may contain backslashes. (This may often - be the case when gcc is run under operating systems such as DOS and OS/2.) - Each backslash in dump_base_name must be converted to two consecutive - backslashes on output. */ #define ASM_FILE_START(FILE) \ - { char *p; \ - fprintf (FILE, "\t.file\t\""); \ - for (p = dump_base_name; *p != '\0'; p++) \ - if (*p == '\\') fprintf (FILE, "\\\\"); \ - else fprintf (FILE, "%c", *p); \ - fprintf (FILE, "\"\n"); } + do { fprintf (FILE, "\t.file\t"); \ + output_quoted_string (FILE, dump_base_name); \ + fprintf (FILE, "\n"); \ + } while (0) /* A C statement or statements which output an assembler instruction opcode to the stdio stream STREAM. The macro-operand PTR is a diff --git a/gcc/config/i386/sun386.h b/gcc/config/i386/sun386.h index 9809723..df24722 100644 --- a/gcc/config/i386/sun386.h +++ b/gcc/config/i386/sun386.h @@ -70,7 +70,9 @@ do \ } \ strncpy (shorter, na, 14); \ shorter[14] = 0; \ - fprintf (FILE, "\t.file\t\"%s\"\n", shorter); \ + fprintf (FILE, "\t.file\t"); \ + output_quoted_string (FILE, shorter); \ + fprintf (FILE, "\n"); \ } \ fprintf (FILE, "\t.version\t\"%s %s\"\n", \ language_string, version_string); \ |