summaryrefslogtreecommitdiff
path: root/gcc/c-tree.h
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-12 23:53:29 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-12 23:53:29 +0000
commitb0b1af642fd3c2318975ed201648def1b7aee348 (patch)
tree55c81129e5904e9a77beedcea89e8ae836694907 /gcc/c-tree.h
parent29dcf6e523dfe91a272557e419a034df52b1343b (diff)
downloadgcc-b0b1af642fd3c2318975ed201648def1b7aee348.tar.gz
* c-common.c, c-decl.c, c-lex.c, c-objc-common.c, c-opts.c,
c-parse.in, c-pragma.c, c-typeck.c: Use %q, %< and %> for quoting in diagnostics. Use %' for English apostrophes. * c-tree.h (ATTRIBUTE_GCC_CDIAG): Define. (pedwarn_c90, pedwarn_c99): Use it. * c-decl.c (lookup_label): Quote label name in diagnostic. * c-parse.in (yyprint): Use ' instead of ` for left quote. * c-typeck.c (warn_for_assignment): Likewise. testsuite: * g++.dg/warn/Wswitch-1.C, g++.dg/warn/Wswitch-2.C, gcc.dg/Wswitch-2.c, gcc.dg/Wswitch-enum.c, gcc.dg/Wswitch.c, gcc.dg/declspec-9.c, gcc.dg/declspec-10.c, gcc.dg/declspec-11.c, gcc.dg/m-un-2.c, gcc.dg/noreturn-1.c, gcc.dg/wtr-conversion-1.c: Update expected messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87413 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-tree.h')
-rw-r--r--gcc/c-tree.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index 0e28dfef3c0..f8601754791 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -413,8 +413,6 @@ extern void set_init_index (tree, tree);
extern void set_init_label (tree);
extern void process_init_element (struct c_expr);
extern tree build_compound_literal (tree, tree);
-extern void pedwarn_c90 (const char *, ...) ATTRIBUTE_PRINTF_1;
-extern void pedwarn_c99 (const char *, ...) ATTRIBUTE_PRINTF_1;
extern tree c_start_case (tree);
extern void c_finish_case (tree);
extern tree build_asm_expr (tree, tree, tree, tree, bool);
@@ -469,5 +467,13 @@ extern void c_write_global_declarations (void);
diagnostic framework extensions, you must include this file before
toplev.h, not after. */
#define GCC_DIAG_STYLE __gcc_cdiag__
+#if GCC_VERSION >= 3005
+#define ATTRIBUTE_GCC_CDIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m ,n))) ATTRIBUTE_NONNULL(m)
+#else
+#define ATTRIBUTE_GCC_CDIAG(m, n) ATTRIBUTE_NONNULL(m)
+#endif
+
+extern void pedwarn_c90 (const char *, ...) ATTRIBUTE_GCC_CDIAG(1,2);
+extern void pedwarn_c99 (const char *, ...) ATTRIBUTE_GCC_CDIAG(1,2);
#endif /* ! GCC_C_TREE_H */