From fcf73884fb9b2a6ae5518beb715b3e6fd3161699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Wed, 23 Jul 2008 15:57:49 +0000 Subject: re PR c/35058 (-Werror= works only with some warnings) 2008-07-23 Manuel Lopez-Ibanez PR 35058 * diagnostic.c (pedwarn): Add opt parameter. (pedwarn0): New. * c-tree.h (pedwarn_init): Add opt parameter. (pedwarn_c90): Likewise. (pedwarn_c99): Likewise. * c-errors.c (pedwarn_c99): Likewise. (pedwarn_c90): Likewise. * toplev.h (pedwarn): Update declaration. (pedwarn0): Declare. * c-lex.c: All calls to pedwarn changed. * builtins.c: All calls to pedwarn changed. * toplev.c: All calls to pedwarn changed. * c-decl.c: All calls to pedwarn changed. * c-typeck.c: All calls to pedwarn changed. * c-common.c: All calls to pedwarn changed. * c-parser.c: All calls to pedwarn changed. cp/ * typeck.c: All calls to pedwarn changed. * decl.c: All calls to pedwarn changed. * call.c: All calls to pedwarn changed. * error.c: All calls to pedwarn changed. * typeck2.c: All calls to pedwarn changed. * pt.c: All calls to pedwarn changed. * name-lookup.c: All calls to pedwarn changed. * parser.c: All calls to pedwarn changed. fortran/ * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed. testsuite/ * gcc.dg/Wdeclaration-after-statement-3.c: New. * gcc/testsuite/gcc.dg/Wpointer-arith.c: New. From-SVN: r138089 --- gcc/c-tree.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/c-tree.h') diff --git a/gcc/c-tree.h b/gcc/c-tree.h index 14df044..d3e3695 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -563,7 +563,7 @@ extern tree c_cast_expr (struct c_type_name *, tree); extern tree build_c_cast (tree, tree); extern void store_init_value (tree, tree); extern void error_init (const char *); -extern void pedwarn_init (const char *); +extern void pedwarn_init (int opt, const char *); extern void maybe_warn_string_init (tree, struct c_expr); extern void start_init (tree, tree, int); extern void finish_init (void); @@ -640,7 +640,7 @@ extern void c_write_global_declarations (void); #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); +extern void pedwarn_c90 (int opt, const char *, ...) ATTRIBUTE_GCC_CDIAG(2,3); +extern void pedwarn_c99 (int opt, const char *, ...) ATTRIBUTE_GCC_CDIAG(2,3); #endif /* ! GCC_C_TREE_H */ -- cgit v1.1