diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2003-06-02 01:41:05 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2003-06-02 01:41:05 +0000 |
commit | 3ae1d4c240f91dc62b85be2addb733fb773956b9 (patch) | |
tree | b762abdd19228fe192566d3e6ab942e566cf8072 /gcc/output.h | |
parent | 069093f524d68bf436a86ec35a4004cb983f4d87 (diff) | |
download | gcc-3ae1d4c240f91dc62b85be2addb733fb773956b9.zip gcc-3ae1d4c240f91dc62b85be2addb733fb773956b9.tar.gz gcc-3ae1d4c240f91dc62b85be2addb733fb773956b9.tar.bz2 |
builtin-attrs.def (ATTR_ASM_FPRINTF): New.
* 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.
From-SVN: r67319
Diffstat (limited to 'gcc/output.h')
-rw-r--r-- | gcc/output.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/output.h b/gcc/output.h index 5be9975..dcbcee6 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. */ |