aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2010-05-28 23:15:55 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2010-05-28 23:15:55 +0000
commit59cc9210fc47a5b2af679803c65669e7e501f0ab (patch)
treebbef9c35e3335826695cecc5a96f08d7e888cedd /gcc/cp
parentbffad7f1cf127cbc4b103db2f30317e9f59422fd (diff)
downloadgcc-59cc9210fc47a5b2af679803c65669e7e501f0ab.zip
gcc-59cc9210fc47a5b2af679803c65669e7e501f0ab.tar.gz
gcc-59cc9210fc47a5b2af679803c65669e7e501f0ab.tar.bz2
c-common.h (GCC_DIAG_STYLE): Define earlier in the file, before including diagnostic-core.h.
gcc/ChangeLog: * c-common.h (GCC_DIAG_STYLE): Define earlier in the file, before including diagnostic-core.h. (c_cpp_error): New prototype moved from c-tree.h. Use ATTRIBUTE_GCC_DIAG instead of ATTRIBUTE_GCC_CDIAG. * c-tree.h (ATTRIBUTE_GCC_CDIAG): Remove define. (pedwarn_c90, perwarn_c99): Use ATTRIBUTE_GCC_DIAG instead. (c_cpp_error): Prototype moved to c-common.h. * Makefile.in: Update dependency for C_COMMON_H. cp/ChangeLog: * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that this file is included before c-common.h. Define GCC_DIAG_STYLE before including diagnostic-core.h and toplev.h. (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG. * pt.c: Include cp-tree.h before c-common.h. From-SVN: r160007
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/cp-tree.h17
-rw-r--r--gcc/cp/pt.c2
3 files changed, 16 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d9164d2..7d69a6e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,13 @@
2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
+ * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
+ this file is included before c-common.h. Define GCC_DIAG_STYLE
+ before including diagnostic-core.h and toplev.h.
+ (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
+ * pt.c: Include cp-tree.h before c-common.h.
+
+2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
+
* tree.c (c_register_addr_space): Add stub.
2010-05-28 Joseph Myers <joseph@codesourcery.com>
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 37a0f1e..15c0042 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -27,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "hashtab.h"
#include "vec.h"
-#include "c-common.h"
-#include "name-lookup.h"
/* In order for the format checking to accept the C++ front end
diagnostic framework extensions, you must include this file before
@@ -36,18 +34,17 @@ along with GCC; see the file COPYING3. If not see
in c-common.h. */
#undef GCC_DIAG_STYLE
#define GCC_DIAG_STYLE __gcc_cxxdiag__
-#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)
-#endif
-#ifdef GCC_TOPLEV_H
+#if defined(GCC_TOPLEV_H) || defined (GCC_C_COMMON_H)
#error \
In order for the format checking to accept the C++ front end diagnostic \
-framework extensions, you must include this file before toplev.h, not after.
+framework extensions, you must include this file before toplev.h and \
+c-common.h, not after.
#endif
#include "toplev.h"
#include "diagnostic.h"
+#include "c-common.h"
+
+#include "name-lookup.h"
/* Usage of TREE_LANG_FLAG_?:
0: IDENTIFIER_MARKED (IDENTIFIER_NODEs)
@@ -4813,7 +4810,7 @@ extern const char *class_key_or_enum_as_string (tree);
extern void print_instantiation_context (void);
extern void maybe_warn_variadic_templates (void);
extern void maybe_warn_cpp0x (cpp0x_warn_str str);
-extern bool pedwarn_cxx98 (location_t, int, const char *, ...) ATTRIBUTE_GCC_CXXDIAG(3,4);
+extern bool pedwarn_cxx98 (location_t, int, const char *, ...) ATTRIBUTE_GCC_DIAG(3,4);
/* in except.c */
extern void init_exception_processing (void);
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 9eeba8a..dcb455b 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -34,8 +34,8 @@ along with GCC; see the file COPYING3. If not see
#include "intl.h"
#include "pointer-set.h"
#include "flags.h"
-#include "c-common.h"
#include "cp-tree.h"
+#include "c-common.h"
#include "cp-objcp-common.h"
#include "tree-inline.h"
#include "decl.h"