This is the mail archive of the gcc-bugs@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]

[Bug target/12764] gcc -g option leaves asterisk (*) on some names to assembler on HP-UX B.10.20


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12764



------- Additional Comments From mario dot nigrovic at motorola dot com  2003-10-26 20:08 -------
I looked at the current cvs, and it seems to have already been addressed.  The
new syntax is

#define ASM_OUTPUT_SOURCE_LINE(file, line, counter)		\
  { static tree last_function_decl = NULL;			\
    if (current_function_decl == last_function_decl)		\
      {								\
	rtx func = DECL_RTL (current_function_decl);		\
	const char *name = XSTR (XEXP (func, 0), 0);		\
	fprintf (file, "\t.stabn 68,0,%d,L$M%d-%s\nL$M%d:\n",	\
		 line, counter,					\
		 (* targetm.strip_name_encoding) (name),	\
		 counter);					\
      }								\
    else							\
      fprintf (file, "\t.stabn 68,0,%d,0\n", line);		\
    last_function_decl = current_function_decl;			\
  }


which is quite a bit different from my solution, but at least means this has
been looked at.  Looking at dbxelf.h, I do see that it's handled differently, there:

#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER)			\
do									\
  {									\
    char temp[256];							\
    ASM_GENERATE_INTERNAL_LABEL (temp, "LM", COUNTER);			\
    fprintf (FILE, "\t.stabn 68,0,%d,", LINE);				\
    assemble_name (FILE, temp);						\
    putc ('-', FILE);							\
    assemble_name (FILE,						\
		   XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
    putc ('\n', FILE);							\
    (*targetm.asm_out.internal_label) (FILE, "LM", COUNTER);		\
  }									\
while (0)

(It's still using assemble_name for the function name.  I don't pretend to
understand the subtleties of this variation, but I guess it does seem suspicious
to me that the implementation is so different.)

-- Mario


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