This is the mail archive of the
mailing list for the GCC project.
Re: PR c/13282: Add a separate -Wmissing-field-initializer
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Jul 2004 14:42:36 +0000 (UTC)
- Subject: Re: PR c/13282: Add a separate -Wmissing-field-initializer
- References: <firstname.lastname@example.org>
On Thu, 29 Jul 2004, Richard Sandiford wrote:
> One of the warnings enabled by -Wextra is for struct initialisers that
> have fewer fields than the struct itself. PR c/13282 asks for a separate
> switch to control the warning, much like we already have with -Wsign-compare.
> Bootstrapped & regression tested on i686-pc-linux-gnu. OK to install?
This patch doesn't test (or document, though that's a pre-existing
condition) the useful property that (at least for C) the use of designated
initializers disables the warning for a particular set of braces.
/* Do not warn if this level of the initializer uses member
designators; it is likely to be deliberate. */
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
email@example.com (personal mail)
firstname.lastname@example.org (Bugzilla assignments and CCs)