I see, thanks for the very clear explanation. :) Bests, -Igor
On Fri, Dec 13, 2013 at 5:45 PM, Willy Tarreau <w...@1wt.eu> wrote: > Hi Igor, > > On Fri, Dec 13, 2013 at 05:13:51PM +0800, Igor wrote: >> Hi, Willy, the patch fixed the reported warning, > > Thanks for testing! I'm merging it then. > >> but seems introduce new warning, the log: http://pastebin.com/dBfHGV2S > > No it's not the same. Gcc is getting *really* annoying. It reports stupid > warnings all the time and forces you to write your code a certain way to > shut them down. It's really unbelievable. Have you seen the comment in the > code? It already says that this ugly construct was made *only* to shut gcc > down. But it seems that your new version is even smarter and now requires > the semi-colon to be put on a distinct line. It does not make any sense > any more, this compiler decides on the *form* of your code, not the semantics. > One day we'll see "Warning, you used parenthesis in sizeof which is an > operator > and not a function" or "your 'if' statement was indented with spaces instead > of > tabs, which might confuse readers with tab size different from 8". > > I think that gcc is more and more developped by monkeys for monkeys. > > Each version is slower and buggier than the previous one, and more annoying > on legacy code. > > I don't want to put the -Wno-xxxxx flags in the default build options because > some older compilers available on certain platforms don't support them all. > At the moment haproxy builds back to gcc 2.95. We can decide to support 3.x > and above in the future but that does not mean we'll gain more options to > silence it. > > That said, if someone is willing to enumerate the list of -Wno-xxx options > that are supported from 2.95 to 4.8 and which allow us to live in peace > with this boring compiler, I'm totally open to add them. > > Thanks, > Willy >