diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-02 01:41:05 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-02 01:41:05 +0000 |
commit | c54d077b29f4323ad1562f0607ccdbbc2dddb9fa (patch) | |
tree | b762abdd19228fe192566d3e6ab942e566cf8072 /gcc/output.h | |
parent | 5437c1da33eee87aac76b5789cc2c2b6fcdefd12 (diff) | |
download | gcc-c54d077b29f4323ad1562f0607ccdbbc2dddb9fa.tar.gz |
* 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67319 138bc75d-0d04-0410-961f-82ee72b054a4
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 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. */ |