This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] prevent -Wall from resetting -Wstringop-overflow=2 to 1 (pr 81345)
On Mon, 10 Jul 2017, Martin Sebor wrote:
> On 07/07/2017 10:58 AM, Joseph Myers wrote:
> > This patch is OK.
> >
>
> Thanks. Committed in r250104.
>
> Do you have any comments on or concerns with changing how
> LangEnabledBy interprets the opt argument as I suggested below?
>
> IMO, it makes little sense for an option that takes an argument
> and that specifies a binary option like -Wall in LangEnabledBy
> to default to the binary value of the latter option. I think
> it would be more intuitive and convenient for it to default to
> the value set by its Init directive for the positive form of
> the binary option and to zero for the negative form (or to empty
> for strings, if that's ever done).
I'm uneasy about the notion of -Wall implying an option that's
on-by-default at all. If it's on-by-default, why should -Wall have
anything to do with it? (Resetting from 2 to 1 is obviously wrong.)
Such an implication only makes sense to me if -Wall implies a *different*
(presumably higher) value than the default. And in the case of Init(-1)
(for special logic to initialize an option), copying the Init value
certainly doesn't make sense in an implication.
--
Joseph S. Myers
joseph@codesourcery.com