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]

[PATCH, spu]: Remove ASM_FORMAT_PRIVATE_NAME


I have just tracked down a warning when building for the SPU target that
has been bugging me for a week or more.  In ipa-struct-reorg.c,
gen_var_name() uses ASM_FORMAT_PRIVATE_NAME (passing a HOST_WIDE_INT for
its third argument).

The SPU backend overrides the ASM_FORMAT_PRIVATE_NAME macro for no
reason that I can tell.  If the overridden definition is removed, the
default definition will use ASM_PN_FORMAT to format the private name.
As the SPU backend does not define NO_DOT_IN_LABEL or
NO_DOLLAR_IN_LABEL, the default format string of "%s.%lu" will be
chosen.  This is what it should be, and this change silences the warning
about the incoming HOST_WIDE_INT argument in ipa-struct-reorg.c.

Okay for mainline, regression test results pending?

Cheers, Ben

2007-11-22  Ben Elliston  <bje@au.ibm.com>

        * config/spu/spu.h (ASM_FORMAT_PRIVATE_NAME): Remove. Use default.

Index: config/spu/spu.h
===================================================================
--- config/spu/spu.h    (revision 130335)
+++ config/spu/spu.h    (working copy)
@@ -515,10 +515,6 @@ targetm.resolve_overloaded_builtin = spu
 #define ASM_OUTPUT_LABELREF(FILE, NAME) \
   asm_fprintf (FILE, "%U%s", default_strip_name_encoding (NAME))
 
-#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
-( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),   \
-  sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
-
 

 /* Instruction Output */
 #define REGISTER_NAMES \



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