From 3734d9607ee407f4c73aa613f96dbfbc0dd6f500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Thu, 6 May 2010 10:12:36 +0000 Subject: re PR c/40989 (-Werror= and #pragma diagnostics do not work with group flags) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2010-05-06 Manuel López-Ibáñez PR 40989 * doc/invoke.texi (Wimplicit): Document as C only. * opts.c (common_handle_option): Add argument kind. (handle_option): Rename as read_cmdline_option. Factor out code to... (handle_option): ... here. New. (handle_options): Rename as read_cmdline_options. (decode_options): Update call. (set_option): Use option index instead of option pointer. Classify diagnostics correctly. (enable_warning_as_error): Call handle_option. * opts.h (set_option): Update declaration. (handle_option): Declare. * langhooks.h (struct lang_hooks): Add argument kind to handle_option. * c.opt (Wimplicit,Wimplicit-int): Initialize to -1. * c-opts.c (set_Wimplicit): Delete. (c_family_lang_mask): New static constant. (c_common_handle_option): Add argument kind. Use handle_option instead of set_Wimplicit. (c_common_post_options): warn_implicit and warn_implicit_int are disabled by default. * c-common.c (warn_implicit): Do not define here. * c-common.h (warn_implicit): Do not declare here. (c_common_handle_option): Update declaration. * lto-opts.c (lto_reissue_options): Update call to set_option. java/ * lang.c (java_handle_option): Add argument kind. fortran/ * options.c (gfc_handle_option): Add argument kind. * gfortran.h (gfc_handle_option): Update declaration. ada/ * gcc-interface/misc.c (gnat_handle_option): Add argument kind. testsuite/ * gcc.dg/pr40989.c: New. From-SVN: r159102 --- gcc/doc/invoke.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/doc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 6a60fbb3..33e4612 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2901,8 +2901,8 @@ Options} and @ref{Objective-C and Objective-C++ Dialect Options}. -Wc++0x-compat @gol -Wchar-subscripts @gol -Wenum-compare @r{(in C/Objc; this is on by default in C++)} @gol --Wimplicit-int @gol --Wimplicit-function-declaration @gol +-Wimplicit-int @r{(C and Objective-C only)} @gol +-Wimplicit-function-declaration @r{(C and Objective-C only)} @gol -Wcomment @gol -Wformat @gol -Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)} @gol @@ -3145,7 +3145,7 @@ enabled by default and it is made into an error by @option{-pedantic-errors}. This warning is also enabled by @option{-Wall}. -@item -Wimplicit +@item -Wimplicit @r{(C and Objective-C only)} @opindex Wimplicit @opindex Wno-implicit Same as @option{-Wimplicit-int} and @option{-Wimplicit-function-declaration}. -- cgit v1.1