diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-03 00:38:49 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-03 00:38:49 +0000 |
commit | 7781aa773af59497f7c834da4807c3d079fa1919 (patch) | |
tree | 8a19c399c9e578fcd71ada4df98540c8fc66eb48 /gcc/toplev.h | |
parent | b946aa753c38c87801a0bc966f2a20a012ead72d (diff) | |
download | gcc-7781aa773af59497f7c834da4807c3d079fa1919.tar.gz |
* c-common.h (GCC_DIAG_STYLE): Define.
* c-tree.h (GCC_DIAG_STYLE): Do not define. Change minimum GCC
version for format checking to 4.1.
* c-format.c: Include toplev.h after c-common.h.
(enum format_type): Add gcc_tdiag_format_type.
(gcc_tdiag_length_specs, gcc_tdiag_flag_pairs,
gcc_tdiag_flag_specs, gcc_tdiag_char_table): New.
(format_types_orig): Add gcc_tdiag.
(init_dynamic_diag_info): Support gcc_tdiag formats.
(handle_format_attribute): Likewise.
* toplev.h (NO_FRONT_END_DIAG, ATTRIBUTE_GCC_FE_DIAG): Remove.
(GCC_DIAG_STYLE): Default to __gcc_tdiag__. Change minimum GCC
version for format checking to 4.1.
(warning0, warning, error, pedwarn, sorry): Use
ATTRIBUTE_GCC_DIAG.
* config/rs6000/rs6000.c (altivec_expand_builtin), varasm.c
(finish_aliases_1): Do not use %qE.
* config/arm/arm.c, config/i386/i386.c, config/mmix/mmix.c,
config/pdp11/pdp11.c, stor-layout.c, tree-eh.c, tree-ssa.c:
Correct format bugs.
* config/v850/v850-protos.h (v850_output_aligned_bss): Change size
parameter to unsigned HOST_WIDE_INT.
* config/v850/v850.c (v850_output_aligned_bss): Likewise.
cp:
* cp-tree.h (GCC_DIAG_STYLE): #undef before defining. Change
minimum GCC version for format checking to 4.1.
testsuite:
* gcc.dg/format/gcc_diag-1.c: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101543 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.h')
-rw-r--r-- | gcc/toplev.h | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/gcc/toplev.h b/gcc/toplev.h index 827b17f3ca9..ddd6b61fe54 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -44,34 +44,25 @@ extern void _fatal_insn (const char *, rtx, const char *, int, const char *) /* If we haven't already defined a frontend specific diagnostics style, use the generic one. */ #ifndef GCC_DIAG_STYLE -#define GCC_DIAG_STYLE __gcc_diag__ -#define NO_FRONT_END_DIAG +#define GCC_DIAG_STYLE __gcc_tdiag__ #endif /* None of these functions are suitable for ATTRIBUTE_PRINTF, because each language front end can extend them with its own set of format - specifiers. We must use custom format checks. Note that at present - the front-end %D specifier is used in non-front-end code with some - functions, and those formats can only be checked in front-end code. */ -#if GCC_VERSION >= 3005 + specifiers. We must use custom format checks. */ +#if GCC_VERSION >= 4001 #define ATTRIBUTE_GCC_DIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m) -#ifdef NO_FRONT_END_DIAG -#define ATTRIBUTE_GCC_FE_DIAG(m, n) ATTRIBUTE_NONNULL(m) -#else -#define ATTRIBUTE_GCC_FE_DIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m) -#endif #else #define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m) -#define ATTRIBUTE_GCC_FE_DIAG(m, n) ATTRIBUTE_NONNULL(m) #endif extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2) ATTRIBUTE_NORETURN; -extern void warning0 (const char *, ...) ATTRIBUTE_GCC_FE_DIAG(1,2); -extern void warning (int, const char *, ...) ATTRIBUTE_GCC_FE_DIAG(2,3); -extern void error (const char *, ...) ATTRIBUTE_GCC_FE_DIAG(1,2); +extern void warning0 (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); +extern void warning (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); +extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2) ATTRIBUTE_NORETURN; -extern void pedwarn (const char *, ...) ATTRIBUTE_GCC_FE_DIAG(1,2); -extern void sorry (const char *, ...) ATTRIBUTE_GCC_FE_DIAG(1,2); +extern void pedwarn (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); +extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); extern void inform (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); extern void verbatim (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); |