This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to warn for format warning options with no effect
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Subject: Re: Patch to warn for format warning options with no effect
- From: Jeffrey A Law <law at redhat dot com>
- Date: Tue, 02 Jan 2001 23:00:14 -0700
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <Pine.LNX.4.30.0012071309510.10715-100000@kern.srcf.societies.cam.
ac.uk>you write:
> This patch makes GCC warn if options such as
> -Wmissing-format-attribute and -Wformat-nonliteral get used without
> -Wformat (in which case they do nothing useful).
>
> Bootstrapped with no regressions on i686-pc-linux-gnu. OK to commit?
>
> 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
>
> * c-common.c (c_common_lang_init): New function. Warn if format
> warning options which only have effects when used with -Wformat
> are used without -Wformat.
> * c-common.h (c_common_lang_init): Declare.
> * c-lang.c (lang_init): Call c_common_lang_init.
>
> 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
>
> * lex.c (lang_init): Call c_common_lang_init.
This is basically OK. I think you need to twiddle objc/objc-act.c::lang_init
in a manner similar to what you did for c-lang.c.
jeff