diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-08-04 22:05:15 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-08-04 22:05:15 +0000 |
commit | 1152f12982b2638344f687bd91ddce8a2050c086 (patch) | |
tree | 7209435896e77068f908ff5677e5b721be6f9c46 /gcc/config/i386/gas.h | |
parent | 2cfa128d714bcbace5fbc4bc3afab386868ba9fe (diff) | |
download | gcc-1152f12982b2638344f687bd91ddce8a2050c086.tar.gz |
(ASM_FILE_START): Write out two backslashes for each backslash in the
filename.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5068 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/gas.h')
-rw-r--r-- | gcc/config/i386/gas.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/config/i386/gas.h b/gcc/config/i386/gas.h index 4821a895c5d..cad9f51e4b5 100644 --- a/gcc/config/i386/gas.h +++ b/gcc/config/i386/gas.h @@ -1,5 +1,5 @@ /* Definitions for Intel 386 running system V with gnu tools - Copyright (C) 1988 Free Software Foundation, Inc. + Copyright (C) 1988, 1993 Free Software Foundation, Inc. This file is part of GNU CC. @@ -93,8 +93,19 @@ 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) \ - fprintf (FILE, "\t.file\t\"%s\"\n", dump_base_name); + { 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"); } /* A C statement or statements which output an assembler instruction opcode to the stdio stream STREAM. The macro-operand PTR is a |