summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-23 23:37:09 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-23 23:37:09 +0000
commit6e9573263d8cc1cea9461733bda7ea2de0f9e3f1 (patch)
treeeefaec1514eb73c58eef6e91f4c09e4a714d9818 /gcc/config
parentb6dc1ff7106713e625d421e499088cd48a86fbfc (diff)
downloadgcc-6e9573263d8cc1cea9461733bda7ea2de0f9e3f1.tar.gz
* config/i386/mingw32.h (OUTPUT_QUOTED_STRING): Properly output
quoted strings. * dwarf2out.c (lookup_filename): Properly quote filename in .file directive in assembly file. * config/m68k/dpx2.h (ASM_OUTPUT_SOURCE_FILENAME): Likewise. * config/m88k/m88k.h (ASM_OUTPUT_SOURCE_FILENAME): Likewise. * config/pj/pj.h (ASM_FILE_START): Likewise. * config/rs6000/xcoff.h (ASM_FILE_START): Likewise. * config/avr/avr.c (asm_file_end): Likewise. * toplev.c (output_quoted_string): Handle possibly signed plain char. * toplev.h (output_clean_symbol_name): Declare * toplev.c (output_clean_symbol_name): Define. * config/alpha/alpha.c (unicosmk_output_module_name): Use it. * config/1750a/1750a.h (ASM_FILE_START): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53817 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/1750a/1750a.h4
-rw-r--r--gcc/config/alpha/alpha.c5
-rw-r--r--gcc/config/avr/avr.c5
-rw-r--r--gcc/config/i386/mingw32.h42
-rw-r--r--gcc/config/m68k/dpx2.h6
-rw-r--r--gcc/config/m88k/m88k.h6
-rw-r--r--gcc/config/pj/pj.h11
-rw-r--r--gcc/config/rs6000/xcoff.h4
8 files changed, 52 insertions, 31 deletions
diff --git a/gcc/config/1750a/1750a.h b/gcc/config/1750a/1750a.h
index 77a8fd72906..c6116942077 100644
--- a/gcc/config/1750a/1750a.h
+++ b/gcc/config/1750a/1750a.h
@@ -833,7 +833,9 @@ enum reg_class { NO_REGS, R2, R0_1, INDEX_REGS, BASE_REGS, ALL_REGS, LIM_REG_CLA
strcpy(name,p); \
if ((p2 = strchr(name,'.'))) \
*p2 = '\0'; \
- fprintf(FILE,"\tname %s\n",name); \
+ fputs ("\tname ", FILE); \
+ output_clean_symbol_name (FILE, name); \
+ putc ('\n', FILE); \
fprintf(FILE,"\tnolist\n\tinclude \"ms1750.inc\"\n\tlist\n\n"); \
fprintf(FILE,"\tglobal\t__main\n\n"); }
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index dad17844d5f..41cb31e0bea 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -8439,9 +8439,8 @@ unicosmk_output_module_name (file)
prefix the module name with a '$' if necessary. */
if (!ISALPHA (*name))
- fprintf (file, "$%s", name);
- else
- fputs (name, file);
+ putc ('$', file);
+ output_clean_symbol_name (file, name);
}
/* Output text that to appear at the beginning of an assembler file. */
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index f75de5e8f1a..3ba0eee33a4 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -4801,9 +4801,10 @@ void
asm_file_end (file)
FILE *file;
{
+ fputs ("/* File ", file);
+ output_quoted_string (file, main_input_filename);
fprintf (file,
- "/* File %s: code %4d = 0x%04x (%4d), prologues %3d, epilogues %3d */\n",
- main_input_filename,
+ ": code %4d = 0x%04x (%4d), prologues %3d, epilogues %3d */\n",
commands_in_file,
commands_in_file,
commands_in_file - commands_in_prologues - commands_in_epilogues,
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index ca74c499269..561022c7186 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -85,25 +85,31 @@ Boston, MA 02111-1307, USA. */
#define MATH_LIBRARY ""
/* Output STRING, a string representing a filename, to FILE.
- We canonicalize it to be in MS-DOS format. */
+ We canonicalize it to be in Unix format (backslashe are replaced
+ forward slashes. */
#undef OUTPUT_QUOTED_STRING
-#define OUTPUT_QUOTED_STRING(FILE, STRING) \
-do { \
- char c; \
- \
- putc ('\"', asm_file); \
- \
- while ((c = *string++) != 0) \
- { \
- if (c == '\\') \
- c = '/'; \
- \
- if (c == '\"') \
- putc ('\\', asm_file); \
- putc (c, asm_file); \
- } \
- \
- putc ('\"', asm_file); \
+#define OUTPUT_QUOTED_STRING(FILE, STRING) \
+do { \
+ char c; \
+ \
+ putc ('\"', asm_file); \
+ \
+ while ((c = *string++) != 0) \
+ { \
+ if (c == '\\') \
+ c = '/'; \
+ \
+ if (ISPRINT (c)) \
+ { \
+ if (c == '\"') \
+ putc ('\\', asm_file); \
+ putc (c, asm_file); \
+ } \
+ else \
+ fprintf (asm_file, "\\%03o", (unsigned char) c); \
+ } \
+ \
+ putc ('\"', asm_file); \
} while (0)
/* Override Cygwin's definition. This is necessary now due to the way
diff --git a/gcc/config/m68k/dpx2.h b/gcc/config/m68k/dpx2.h
index 4e540b89ee0..0686b736065 100644
--- a/gcc/config/m68k/dpx2.h
+++ b/gcc/config/m68k/dpx2.h
@@ -113,7 +113,11 @@ Boston, MA 02111-1307, USA. */
#undef ASM_OUTPUT_SOURCE_FILENAME
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, NA) \
- do { fprintf ((FILE), "\t.file\t'%s'\n", (NA)); } while (0)
+ do { \
+ fprintf (FILE, "\t.file\t"); \
+ output_quoted_string (FILE, NA); \
+ putc ('\n', FILE); \
+ } while (0)
/*
* we don't seem to support any of:
diff --git a/gcc/config/m88k/m88k.h b/gcc/config/m88k/m88k.h
index 172c2d661cf..38bc2e0a629 100644
--- a/gcc/config/m88k/m88k.h
+++ b/gcc/config/m88k/m88k.h
@@ -1740,7 +1740,11 @@ 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, "%s\"%s\"\n", FILE_ASM_OP, NAME)
+ do { \
+ fprintf (FILE_ASM_OP, FILE); \
+ output_quoted_string (FILE, NAME); \
+ putc ('\n', FILE); \
+ } while (0)
#ifdef SDB_DEBUGGING_INFO
#undef ASM_OUTPUT_SOURCE_LINE
diff --git a/gcc/config/pj/pj.h b/gcc/config/pj/pj.h
index 294f2fea983..4167973c2c8 100644
--- a/gcc/config/pj/pj.h
+++ b/gcc/config/pj/pj.h
@@ -1017,10 +1017,13 @@ struct pj_args
/* The text to go at the start of the assembler file. */
#undef ASM_FILE_START
-#define ASM_FILE_START(FILE) \
- fprintf (FILE,"\t.file\t\"%s\"\n", main_input_filename); \
- fprintf (FILE,"\t! %s\n", TARGET_LITTLE_ENDIAN ? ".little" : ".big"); \
- fprintf (FILE,"\t.align 4\n");
+#define ASM_FILE_START(FILE) \
+ do { \
+ fputs ("\t.file\t", FILE); \
+ output_quoted_string (FILE, main_input_filename); \
+ fprintf (FILE,"\t! %s\n", TARGET_LITTLE_ENDIAN ? ".little" : ".big"); \
+ fprintf (FILE,"\t.align 4\n"); \
+ } while (0)
#define ASM_APP_ON ""
#define ASM_APP_OFF ""
diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h
index 2c392439f22..45c7054963f 100644
--- a/gcc/config/rs6000/xcoff.h
+++ b/gcc/config/rs6000/xcoff.h
@@ -221,7 +221,9 @@ toc_section () \
rs6000_gen_section_name (&xcoff_read_only_section_name, \
main_input_filename, ".ro_"); \
\
- fprintf (FILE, "\t.file\t\"%s\"\n", main_input_filename); \
+ fputs ("\t.file\t", FILE); \
+ output_quoted_string (FILE, main_input_filename); \
+ fputc ('\n', FILE); \
if (TARGET_64BIT) \
fputs ("\t.machine\t\"ppc64\"\n", FILE); \
toc_section (); \