This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add a __nowarn__ keyword
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 10 Aug 2007 11:38:34 +0200
- Subject: Re: Add a __nowarn__ keyword
- Reply-to: bonzini at gnu dot org
[sorry for breaking the thread]
+ if (strcmp (kind_string, "push") == 0)
+ {
+ stack = (diagnostic_stack_entry_t *) xmalloc (sizeof (diagnostic_stack_entry_t));
+ stack->previous = diagnostic_stack;
+ stack->state = diagnostic_save_classifications (global_dc);
+ diagnostic_stack = stack;
+ return;
+ }
If yes, is the "push" necessary? Can we make it implicit?
We could have something like this:
if (memcmp (kind_string, "push", 4) == 0
&& (kind_string[4] == '\0' || ISSPACE (kind_string[4])))
{
...
diagnostic_stack = stack;
kind_string += 4;
while (ISSPACE (*kind_string))
kind_string++;
if (*kind_string == '\0')
return;
}
which allows both
#pragma GCC diagnostics push
and
#pragma GCC diagnostics push ignore "-Wcast-qual"
Paolo