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] Enable PCH support on Solaris


> > All PCH tests now pass on SPARC64, almost all on SPARC32. I'm tracking
> > down the few (7) failures.
>
> This is OK, thanks!

Thanks for the quick review, the patch is now in. And I've tracked down the
few remaining failures to this macro:

#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE)				\
do									\
  {									\
    static int sym_lineno = 1;						\
    char temp[256];							\
    ASM_GENERATE_INTERNAL_LABEL (temp, "LM", sym_lineno);		\
    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", sym_lineno);			\
    sym_lineno += 1;							\
  }									\
while (0)

which uses the hidden static variable 'sym_lineno'. It is defined in

	config/dbxcoff.h
	config/dbxelf.h
	config/lynx.h
	config/ptx4.h

and in a bunch of port-specific header files. So, before I start to modify 
everything, I'd like you to validate the solution.

Should I add a third argument to the macro, like

	#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, STATIC_COUNTER)

and document that 'STATIC_COUNTER' is an unique integer counter with static 
storage duration provided by the caller, initialized by the caller to 0 and 
never modified by it afterward?

-- 
Eric Botcazou


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