<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 9, 2015 at 6:21 PM, Joerg Sonnenberger via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Fri, Oct 09, 2015 at 07:09:22PM -0400, Edward Diener via cfe-dev wrote:<br>
> >Does GCC really allow -Wno-xxx flags that /precede/ -Wall on the command<br>
> >line to override -Wall? That seems broken.<br>
><br>
> Yes, but it is not broken. According to gcc's documentation that is the way<br>
> it should be. The gcc compiler is not order sensitive in allowing a specific<br>
> compiler warning to override a general compiler warning. Therefore a<br>
> specific -Wno-xxx warning will override a -Wall or -Wextra warning no matter<br>
> where on the command line a specific warning is in relation to the general<br>
> warning.<br>
<br>
</span>Just because someone had the brilliant idea to implement it that way<br>
doesn't mean others agree. Most important, the GCC behavior starts to<br>
show its insanity as soon as you have multiple levels of warning groups.<br></blockquote><div><br><br></div><div>From my random outside user's perspective, order dependent options are a pain, <br>especially when you're not constructing the command line manually, but rather using <br>one put together in bits and pieces by a build system. On more than one occasion I<br></div><div>have cursed at my computer because various (admittedly non-warning) options have <br>been the wrong way around on the command line.<br></div><div><br></div><div>I also don't see any insanity with this sort of behavior on multiple levels of warning groups - <br>at least from a users' perspective. The options are taken as an unordered set, and the <br>most specific version "wins". True, it may get confusing if you don't know which options are<br></div><div>included with a group, but that's also true for the order dependent version and constructs like <br>"-Wno-xxx -Wgroup". If anything, to me the order independent one would seem less confusing, <br>as you don't ever get "I explicitly set -Wno-xxx! Why am I getting xxx warnings?!"<br><br></div><div>Just my two cents.<br></div></div></div></div>