aboutsummaryrefslogtreecommitdiff
path: root/gcc/output.h
diff options
context:
space:
mode:
authorKaveh Ghazi <ghazi@caip.rutgers.edu>2003-06-02 01:41:05 +0000
committerKaveh Ghazi <ghazi@caip.rutgers.edu>2003-06-02 01:41:05 +0000
commitb91999073ea13447281ef96de7423872fce490ce (patch)
treeb762abdd19228fe192566d3e6ab942e566cf8072 /gcc/output.h
parenta34d35cc9d608905637485bb2a9308e030d14076 (diff)
* builtin-attrs.def (ATTR_ASM_FPRINTF): New.
* c-format.c (enum format_type): Add asm_fprintf_format_type. (NOARGUMENTS, asm_fprintf_length_specs, asm_fprintf_flag_specs, asm_fprintf_flag_pairs, asm_fprintf_char_table): New. (format_types_orig): Renamed from format_types. Add new data. (format_types): Declare as pointer. (handle_format_attribute): Move later in file so we have all necessary declarations. Add section to capture HOST_WIDE_INT. * output.h (ATTRIBUTE_ASM_FPRINTF, __gcc_host_wide_int__): New. (asm_fprintf): Mark with ATTRIBUTE_ASM_FPRINTF. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@67319 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/output.h')
-rw-r--r--gcc/output.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/output.h b/gcc/output.h
index 5be997506a3..dcbcee69139 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -105,7 +105,17 @@ extern void output_addr_const PARAMS ((FILE *, rtx));
/* Output a string of assembler code, substituting numbers, strings
and fixed syntactic prefixes. */
-extern void asm_fprintf PARAMS ((FILE *file, const char *p, ...));
+#if GCC_VERSION >= 3004
+#define ATTRIBUTE_ASM_FPRINTF(m, n) __attribute__ ((__format__ (__asm_fprintf__, m, n))) ATTRIBUTE_NONNULL(m)
+/* This is a magic identifier which allows GCC to figure out the type
+ of HOST_WIDE_INT for %wd specifier checks. You must issue this
+ typedef before using the __asm_fprintf__ format attribute. */
+typedef HOST_WIDE_INT __gcc_host_wide_int__;
+#else
+#define ATTRIBUTE_ASM_FPRINTF(m, n) ATTRIBUTE_NONNULL(m)
+#endif
+
+extern void asm_fprintf PARAMS ((FILE *file, const char *p, ...)) ATTRIBUTE_ASM_FPRINTF(2, 3);
/* Split up a CONST_DOUBLE or integer constant rtx into two rtx's for single
words. */