This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]