bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warning flags in 2.4.1


From: Akim Demaille
Subject: Re: warning flags in 2.4.1
Date: Mon, 28 Mar 2011 09:37:03 +0200

Le 28 mars 2011 à 04:55, Joel E. Denny a écrit :

> To put that another way, -Wall doesn't enable -Werror, so -Wnone shouldn't 
> disable -Werror.  I'd like to fix that on branch-2.5 and master.
> 
> However, I first need to cherry pick a related patch from master to 
> branch-2.5 and document that patch in NEWS.
> 
> The whole patch series appears below.  Any objections?

This is fine.  With the exception of a minor coding style issue on the braces 
here:

>> From 310ebcafe2cbf039e3c0c580bfc0c9bb46a4c383 Mon Sep 17 00:00:00 2001
> From: Joel E. Denny <address@hidden>
> Date: Sun, 27 Mar 2011 15:39:25 -0400
> Subject: [PATCH 3/3] Don't let -Wnone disable -Werror.
> index d65cfc0..c558322 100644
> --- a/src/getargs.c
> +++ b/src/getargs.c
> @@ -106,21 +107,23 @@ flags_argmatch (const char *option,
>       {
>         int no = strncmp (args, "no-", 3) == 0 ? 3 : 0;
>         int value = XARGMATCH (option, args + no, keys, values);
> -       if (value == 0)
> +       if (value == 0) {
>           if (no)
> -           *flags = ~0;
> +           *flags |= all;
>           else
> -           *flags = 0;
> -       else
> +           *flags &= ~all;
> +       }
> +       else {
>           if (no)
>             *flags &= ~value;
>           else
>             *flags |= value;
> +       }
>         args = strtok (NULL, ",");
>       }
>     }
>   else
> -    *flags = ~0;
> +    *flags |= all;
> }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]