aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-tree.h
diff options
context:
space:
mode:
authorJoseph Myers <jsm@polyomino.org.uk>2004-09-13 00:53:29 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2004-09-13 00:53:29 +0100
commitbda6743181d05dc6421dc0e120b13f7aba727c58 (patch)
tree55c81129e5904e9a77beedcea89e8ae836694907 /gcc/c-tree.h
parent924479e8e8c53ab678eabe5cb43e10478cd5b763 (diff)
downloadgcc-bda6743181d05dc6421dc0e120b13f7aba727c58.zip
gcc-bda6743181d05dc6421dc0e120b13f7aba727c58.tar.gz
gcc-bda6743181d05dc6421dc0e120b13f7aba727c58.tar.bz2
c-common.c, [...]: Use %q, %< and %> for quoting in diagnostics.
* 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. From-SVN: r87413
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 0e28dfe..f860175 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 */