[PATCH]: add printf attribute to mips_declare_object
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Fri May 27 17:12:00 GMT 2005
I noticed mips_declare_object() could take the printf attribute. I
don't have access to a mips system anymore to test, but I built a
cross to mips-unknown-linux-gnu and found one format nit which I
fixed.
Okay for mainline?
Thanks,
--Kaveh
2005-05-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* config/mips/mips-protos.h (mips_declare_object): Add printf
attribute.
* config/mips/mips.c (mips_declare_object_name): Fix format
argument.
diff -rup orig/egcc-CVS20050521/gcc/config/mips/mips-protos.h egcc-CVS20050521/gcc/config/mips/mips-protos.h
--- orig/egcc-CVS20050521/gcc/config/mips/mips-protos.h 2005-03-14 22:13:54.000000000 -0500
+++ egcc-CVS20050521/gcc/config/mips/mips-protos.h 2005-05-22 08:26:41.000000000 -0400
@@ -184,7 +184,7 @@ extern void mips_declare_common_object (
const char *, unsigned HOST_WIDE_INT,
unsigned int, bool);
extern void mips_declare_object (FILE *, const char *, const char *,
- const char *, ...);
+ const char *, ...) ATTRIBUTE_PRINTF_4;
extern void mips_declare_object_name (FILE *, const char *, tree);
extern void mips_finish_declare_object (FILE *, tree, int, int);
diff -rup orig/egcc-CVS20050521/gcc/config/mips/mips.c egcc-CVS20050521/gcc/config/mips/mips.c
--- orig/egcc-CVS20050521/gcc/config/mips/mips.c 2005-05-13 20:41:56.000000000 -0400
+++ egcc-CVS20050521/gcc/config/mips/mips.c 2005-05-22 08:38:24.000000000 -0400
@@ -5609,7 +5609,7 @@ mips_declare_object_name (FILE *stream,
ASM_OUTPUT_SIZE_DIRECTIVE (stream, name, size);
}
- mips_declare_object (stream, name, "", ":\n", 0);
+ mips_declare_object (stream, name, "", ":\n");
}
/* Implement ASM_FINISH_DECLARE_OBJECT. This is generic ELF stuff. */
More information about the Gcc-patches
mailing list