diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2010-05-28 23:15:55 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2010-05-28 23:15:55 +0000 |
commit | 59cc9210fc47a5b2af679803c65669e7e501f0ab (patch) | |
tree | bbef9c35e3335826695cecc5a96f08d7e888cedd /gcc/c-common.h | |
parent | bffad7f1cf127cbc4b103db2f30317e9f59422fd (diff) | |
download | gcc-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/c-common.h')
-rw-r--r-- | gcc/c-common.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 3056cae..f0541e9 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -26,6 +26,16 @@ along with GCC; see the file COPYING3. If not see #include "cpplib.h" #include "ggc.h" +/* In order for the format checking to accept the C frontend + diagnostic framework extensions, you must include this file before + toplev.h, not after. The C front end formats are a subset of those + for C++, so they are the appropriate set to use in common code; + cp-tree.h overrides this for C++. */ +#ifndef GCC_DIAG_STYLE +#define GCC_DIAG_STYLE __gcc_cdiag__ +#endif +#include "diagnostic-core.h" + /* Usage of TREE_LANG_FLAG_?: 0: TREE_NEGATED_INT (in INTEGER_CST). IDENTIFIER_MARKED (used by search routines). @@ -999,6 +1009,9 @@ extern void init_c_lex (void); extern void c_cpp_builtins (cpp_reader *); extern void c_cpp_builtins_optimize_pragma (cpp_reader *, tree, tree); +extern bool c_cpp_error (cpp_reader *, int, int, location_t, unsigned int, + const char *, va_list *) + ATTRIBUTE_GCC_DIAG(6,0); /* Positive if an implicit `extern "C"' scope has just been entered; negative if such a scope has just been exited. */ @@ -1175,13 +1188,4 @@ extern bool c_omp_sharing_predetermined (tree); extern tree c_omp_remap_decl (tree, bool); extern void record_types_used_by_current_var_decl (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. The C front end formats are a subset of those - for C++, so they are the appropriate set to use in common code; - cp-tree.h overrides this for C++. */ -#ifndef GCC_DIAG_STYLE -#define GCC_DIAG_STYLE __gcc_cdiag__ -#endif - #endif /* ! GCC_C_COMMON_H */ |