git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Adam Spiers
Message 10 of 10 in “Help newbie git developers avoid obvious pitfalls”
  1. 0/3 Help newbie git developers avoid obvious pitfallsAdam Spiers, Dec 16, 2012
  2. 1/3 SubmittingPatches: add convention of prefixing commit messagesAdam Spiers, Dec 16, 2012
  3. Junio C HamanoDec 16, 2012
  4. 2/3 Documentation: move support for old compilers to CodingGuidelinesAdam Spiers, Dec 16, 2012
  5. 3/3 Makefile: use -Wdeclaration-after-statement if supportedAdam Spiers, Dec 16, 2012
  6. Junio C HamanoDec 17, 2012
  7. Adam SpiersDec 17, 2012
  8. Junio C HamanoDec 17, 2012
  9. Adam SpiersDec 22, 2012
  10. Junio C HamanoDec 22, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.