On Fri, Apr 13, 2012 at 12:46 PM, Dave Korn <dave.korn.cyg...@gmail.com> wrote:
> On 13/04/2012 22:45, Oleg Smolsky wrote:
>> On 2012-04-11 01:50, Vincent Lefevre wrote:
>>> On 2012-04-09 13:03:38 -0500, Gabriel Dos Reis wrote:
>>>> On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar<de...@adacore.com>  wrote:
>>>>> On 4/9/2012 1:36 PM, Jonathan Wakely wrote:
>>>>>
>>>>>> Maybe -Wstandard isn't the best name though, as "standard" usually
>>>>>> means something quite specific for compilers, and the warning switch
>>>>>> wouldn't have anything to do with standards conformance.
>>>>> -Wdefault
>>>>>
>>>>> might be better
>>>> except if people want warnings about "defaults" in C++11 (which can mean
>>>> lot of things).
>>> How about a warning level?
>>>
>>> -W0: no warnings (equivalent to -w)
>>> -W1: default
>>> -W2: equivalent to the current -Wall
>>> -W3: equivalent to the current -Wall -Wextra
>>>
>> This is exactly what Microsoft C++ compiler does and what their Visual
>> Studio IDE exposes in the UI. So, there is a reasonable precedent.
>
>  Exactly.  Would anyone really think it would be a good idea to just not have
> the -O<number> levels and expect every end user to mix-and-match from a huge
> set of somewhat unknown-and-unpredictable-just-from-the-names long and
> confusingly named individual optimisation suboptions?  I think -W levels is a
> new feature that we can easily retrofit on top of the existing structure
> without having to break or change anything that already works, and that would
> be equally as user-friendly and pragmatic as having -O levels has already
> shown itself to be.

First, I think the -Wn option is fantastic, and I look forward to seeing it.

Second, some questions.

With -O, it's often said that a given -On level does not correspond to
an equivalent list of -f options.  I believe even the manual states
that for instance -O2 is a bunch of -f's plus some other stuff that
you can't turn on without -O2.  Would warnings options avoid this?
IMO, that's a deficiency in -O, and meta options should be strictly
meta.  So I guess I'm really asking that the precedent be set that -Wn
is always an amalgamation of existing -W options, and that we avoid
the -On situation.

Can the -Winf option really happen?  It should be easy to make that
turn on every -W option without having the manually list them and keep
it up to date.  Like, it should be easy, I would hope, to make that be
automatic.  Even if just used as a toy, I think this is a neat idea
that would not require much work.

Would a plugin be able to add in -W's to a given level?  So like, I
want to use MyPlug, and that comes with it -WMyWarn.  I'd like my
plugin to be able to say that -W2 turns on -WMyWarn.

Reply via email to