From: Junio C Hamano Date: Mon, 17 Dec 2012 04:18:33 GMT Subject: Re: [PATCH 3/3] Makefile: use -Wdeclaration-after-statement if supported Message-ID: <7v8v8xpazq.fsf@alter.siamese.dyndns.org> In-Reply-To: <20121217021501.GA13745@gmail.com> Adam Spiers writes: > OK; I expect these issues with the implementation are all > surmountable. I did not necessarily expect this to be the final > implementation anyhow, as indicated by my comments below the divider > line. However it's not clear to me what you think about the idea in > principle, and whether other compiler flags would merit inclusion. As different versions of GCC behave differently, and the same GCC (mis)detect issues differently depending on the optimization level, I do not know if it will be a fruitful exercise to try to come up with one expression to come up with the set of flags to suit everybody. One flag I prefer to use is -Werror, but that means the other flags must have zero false positive rate. If you are interested, the flags I personally use with the version of GCC I happen to have is in the Make script on the 'todo' branch.