aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2005-07-03 01:38:49 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2005-07-03 01:38:49 +0100
commitea40ba9c04882ea2ddf987e2783f98cc38bac081 (patch)
tree8a19c399c9e578fcd71ada4df98540c8fc66eb48 /gcc/cp
parent3be91f647000940ada4a7c512a2cf5d6e2971817 (diff)
downloadgcc-ea40ba9c04882ea2ddf987e2783f98cc38bac081.zip
gcc-ea40ba9c04882ea2ddf987e2783f98cc38bac081.tar.gz
gcc-ea40ba9c04882ea2ddf987e2783f98cc38bac081.tar.bz2
c-common.h (GCC_DIAG_STYLE): Define.
* 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. From-SVN: r101543
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-tree.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f72156d..2f0ecd2 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-03 Joseph S. Myers <joseph@codesourcery.com>
+
+ * cp-tree.h (GCC_DIAG_STYLE): #undef before defining. Change
+ minimum GCC version for format checking to 4.1.
+
2005-07-02 Kazu Hirata <kazu@codesourcery.com>
* Make-lang.in (cc1plus-checksum.c): Use
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 2cef234..7edb1e6 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4367,9 +4367,11 @@ extern void cp_genericize (tree);
/* In order for the format checking to accept the C++ frontend
diagnostic framework extensions, you must include this file before
- toplev.h, not after. */
+ toplev.h, not after. We override the definition of GCC_DIAG_STYLE
+ in c-common.h. */
+#undef GCC_DIAG_STYLE
#define GCC_DIAG_STYLE __gcc_cxxdiag__
-#if GCC_VERSION >= 3004
+#if GCC_VERSION >= 4001
#define ATTRIBUTE_GCC_CXXDIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m)
#else
#define ATTRIBUTE_GCC_CXXDIAG(m, n) ATTRIBUTE_NONNULL(m)