Yes, they will be used by default, of course assuming the compiler supports 
them.

For instance, take the string "-Wlogical-op -Wsync-nand -Wtrampolines". If you 
check this against a compiler which doesn't support -Wlogical-op, the check 
will fail so none of the options are added. This happens even if the compiler 
might have supported the other two. 

So this division is mainly done so that we have a minium baseline ("-Wall 
-Wextra") which is guaranteed to be there, and potentially an extended set of 
warnings if your compiler supports all of them.

Ideally we would have some nice way to check the indiviual options and apply 
the only supported ones. But until we have that, I have split them into 
categories so that a single unsupported option will not be able to disable the 
baseline warnings. I don't like the thought of developers which see no warnings 
at all in the code they write because they happen to have an older compiler 
which doesn't support one of the additional options. 

In other words, we take the baseline warnings which should always be there, add 
some extra warnings if all are recognized, and add a few more if the compiler 
is GCC (or strictly speaking, supports these GCC-only options).

I also mentioned this briefly in the previous merge 
https://code.launchpad.net/~hjd/widelands/compilation-warnings/+merge/141946
-- 
https://code.launchpad.net/~hjd/widelands/warnings/+merge/145089
Your team Widelands Developers is requested to review the proposed merge of 
lp:~hjd/widelands/warnings into lp:widelands.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to