aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@gnu.org>1993-09-28 00:23:58 +0000
committerPaul Eggert <eggert@gnu.org>1993-09-28 00:23:58 +0000
commitf40176b103d16970a6d27e2f77b208055c05f6a6 (patch)
tree796dabb4fa322396ee63f1a94d6f201a69419298
parenta1c3672f1295e35976b874e4922186e1ea5fb24d (diff)
downloadgcc-f40176b103d16970a6d27e2f77b208055c05f6a6.zip
gcc-f40176b103d16970a6d27e2f77b208055c05f6a6.tar.gz
gcc-f40176b103d16970a6d27e2f77b208055c05f6a6.tar.bz2
(ASM_OUTPUT_SOURCE_FILENAME): Quote special characters in file names.
From-SVN: r5493
-rw-r--r--gcc/config/elxsi/elxsi.h5
-rw-r--r--gcc/config/m68k/3b1.h5
-rw-r--r--gcc/config/m68k/crds.h5
-rw-r--r--gcc/config/m68k/mot3300.h5
-rw-r--r--gcc/config/m68k/tower-as.h4
-rw-r--r--gcc/config/m88k/m88k.h5
-rw-r--r--gcc/dwarfout.c5
7 files changed, 27 insertions, 7 deletions
diff --git a/gcc/config/elxsi/elxsi.h b/gcc/config/elxsi/elxsi.h
index dec91f5..c09e2c0 100644
--- a/gcc/config/elxsi/elxsi.h
+++ b/gcc/config/elxsi/elxsi.h
@@ -727,7 +727,10 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
/* Output the name of the file we are compiling. */
#define ASM_OUTPUT_SOURCE_FILENAME(STREAM, NAME) \
- fprintf(STREAM, "\t.file\t\"%s\"\n", NAME);
+ do { fprintf (STREAM, "\t.file\t"); \
+ output_quoted_string (STREAM, NAME); \
+ fprintf (STREAM, "\n"); \
+ } while (0)
/* Output at beginning of assembler file. */
#define ASM_FILE_START(FILE) fprintf (FILE, "");
diff --git a/gcc/config/m68k/3b1.h b/gcc/config/m68k/3b1.h
index 348de25..e5b9dc0 100644
--- a/gcc/config/m68k/3b1.h
+++ b/gcc/config/m68k/3b1.h
@@ -181,7 +181,10 @@ do { long l; \
/* The beginnings of sdb support... */
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \
- fprintf (FILE, "\tfile\t\"%s\"\n", FILENAME)
+ do { fprintf (FILE, "\tfile\t"); \
+ output_quoted_string (FILE, FILENAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO) \
fprintf (FILE, "\tln\t%d\n", \
diff --git a/gcc/config/m68k/crds.h b/gcc/config/m68k/crds.h
index f0e0131..3d7cfaa 100644
--- a/gcc/config/m68k/crds.h
+++ b/gcc/config/m68k/crds.h
@@ -460,7 +460,10 @@ do { long l[2]; \
}}
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \
- fprintf (FILE, "\t; file\t\"%s\"\n", FILENAME)
+ do { fprintf (FILE, "\t; file\t"); \
+ output_quoted_string (FILE, FILENAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO) \
fprintf (FILE, "\t; ln\t%d\n", \
diff --git a/gcc/config/m68k/mot3300.h b/gcc/config/m68k/mot3300.h
index d1c31c5..b949dc0 100644
--- a/gcc/config/m68k/mot3300.h
+++ b/gcc/config/m68k/mot3300.h
@@ -386,7 +386,10 @@ do { long l; \
#undef ASM_OUTPUT_SOURCE_FILENAME
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \
- fprintf (FILE, "\tfile\t\"%s\"\n", FILENAME)
+ do { fprintf (FILE, "\tfile\t"); \
+ output_quoted_string (FILE, FILENAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
#undef ASM_OUTPUT_SOURCE_LINE
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO) \
diff --git a/gcc/config/m68k/tower-as.h b/gcc/config/m68k/tower-as.h
index ed1f0bf..caa4c2a 100644
--- a/gcc/config/m68k/tower-as.h
+++ b/gcc/config/m68k/tower-as.h
@@ -71,7 +71,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \
do { \
- fprintf (FILE, "\tfile\t\"%s\"\n", FILENAME); \
+ fprintf (FILE, "\tfile\t"); \
+ output_quoted_string (FILE, FILENAME); \
+ fprintf (FILE, "\n"); \
fprintf (FILE, "section ~init,\"x\"\n"); \
fprintf (FILE, "section ~fini,\"x\"\n"); \
fprintf (FILE, "section ~rodata,\"x\"\n"); \
diff --git a/gcc/config/m88k/m88k.h b/gcc/config/m88k/m88k.h
index 8573f1a..30ca9a7 100644
--- a/gcc/config/m88k/m88k.h
+++ b/gcc/config/m88k/m88k.h
@@ -1819,7 +1819,10 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
#undef ASM_FILE_END
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) \
- fprintf (FILE, "\t%s\t \"%s\"\n", FILE_ASM_OP, NAME)
+ do { fprintf (FILE, "\t%s\t ", FILE_ASM_OP); \
+ output_quoted_string (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } while (0)
#ifdef SDB_DEBUGGING_INFO
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index a4b128a..1300afd 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -578,7 +578,10 @@ static unsigned lookup_filename ();
#ifndef ASM_OUTPUT_SOURCE_FILENAME
#define ASM_OUTPUT_SOURCE_FILENAME(FILE,NAME) \
- fprintf ((FILE), "\t%s\t\"%s\"\n", FILE_ASM_OP, NAME)
+ do { fprintf (FILE, "\t%s\t", FILE_ASM_OP); \
+ output_quoted_string (FILE, NAME); \
+ fputc ('\n', FILE); \
+ } while (0)
#endif
#ifndef ASM_OUTPUT_DEF