This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Output names safely in assembly
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: gdr at codesourcery dot com, mark at codesourcery dot com, zack at codesourcery dot com
- Date: Sat, 25 May 2002 08:50:33 -0400 (EDT)
- Subject: Re: PATCH: Output names safely in assembly
> 2002-05-23 Gabriel Dos Reis <gdr@codesourcery.com>
> Zack Weinberg <zack@codesourcery.com>
>
> * toplev.c (output_clean_symbol_name): Define.
>
> + /* 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);
xstrdup?
> +
> + /* Make it look like a valid identifier for an assembler. */
> + clean_symbol_name (id);
> +
> + fputs (file, name);
Args reversed?
--Kaveh
--
Kaveh R. Ghazi Director of Systems Architecture
ghazi@caip.rutgers.edu Qwest Solutions