Re: [PATCH 3/3] Makefile: use -Wdeclaration-after-statement if supported
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 22, 2012, 18:39 UTC
- Message-ID
- <7vsj6yq6co.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CAOkDyE_+3n8PS_6vs-HG6v5A4SirBPVVCdgeUPOPpwaNpkk9Uw@mail.gmail.com>
Adam Spiers <git@adamspiers.org> writes:
> Fair enough, but let's not allow perfect to become the enemy of good.
That is why I would prefer a solution without any false positive while allowing false negatives, i.e. not force everybody to use these flags without giving a way to turn them off.
You could perhaps sell us a solution like this:
* Put these more strict options to CC_FLAGS_PEDANTIC (you may later want to come up with LD_FLAGS_PEDANTIC and friends to make other comands also more strict).
* Introduce PEDANTIC variable that turns XX_FLAGS_PEDANTIC variables to less strict when set to 0 and more strict when set to 1, similar to the way the variable V makes "make V=0" and "make V=1" behave slightly differently.
Then we could introduce PEDANTIC=0 as default first to have people try it out, with an expectation that later we can flip the default to 'on' when the feature matures.