From 211a0cbe1392b37ed05c0aa4675756c1209aa81c Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Thu, 23 May 2002 23:37:09 +0000 Subject: mingw32.h (OUTPUT_QUOTED_STRING): Properly output quoted strings. * 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. Co-Authored-By: Zack Weinberg From-SVN: r53817 --- gcc/toplev.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'gcc/toplev.c') diff --git a/gcc/toplev.c b/gcc/toplev.c index 9c47002..13dc17d 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1704,12 +1704,31 @@ output_quoted_string (asm_file, string) putc (c, asm_file); } else - fprintf (asm_file, "\\%03o", c); + fprintf (asm_file, "\\%03o", (unsigned char) c); } putc ('\"', asm_file); #endif } +/* Output NAME into FILE after having turned it into something + usable as an identifier in a target's assembly file. */ +void +output_clean_symbol_name (file, name) + FILE *file; + const char *name; +{ + /* Make a copy of NAME. */ + char *id = (char *)xmalloc (strlen (name) + 1); + strcpy (id, name); + + /* Make it look like a valid identifier for an assembler. */ + clean_symbol_name (id); + + fputs (file, name); + free (id); +} + + /* Output a file name in the form wanted by System V. */ void -- cgit v1.1