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

Re: [PATCH v2 0/2] Makefile: "pedantic" fallout on .depend and "compdb"

From
Jeff King <peff@peff.net>
Date
Sep 23, 2021, 17:38 UTC
Message-ID
<YUy7k3Yo0YeiFk6u@coredump.intra.peff.net>
In-Reply-To
<cover-v2-0.2-00000000000-20210922T220532Z-avarab@gmail.com>
On Thu, Sep 23, 2021 at 12:08:00AM +0200, Ævar Arnfjörð Bjarmason wrote:
> In this v2 I just added an unconditional -Wno-pedantic and omitted the
> change to spew error on STDERR. This more narrowly fixes the immediate
> issue and doesn't get into whether we should use /dev/null or whatever
> as input.

FWIW, this seems perfectly fine to me. Removing $(ALL_CFLAGS) entirely seems OK to me, too, but this is a smaller change, and would help any cases where those flags are somehow important to getting the compiler to function at all.

It's possible some compiler _does_ understand -MF, etc, but not -Wno-pedantic, but that seems unlikely to me. (And of course there is always the fallback of setting COMPUTE_HEADER_DEPENDENCIES yourself on such a system; this is really just about doing the right thing on most people's setups).

Another related alternative is to use -Wno-error, which would fix the pedantic problem, along with any other warnings a compiler chooses to bring up for an empty file. I don't have a strong opinion on one versus the other.

-Peff
Previous: Junio C Hamano
Message 21 of 21 in “Makefile: make COMPUTE_HEADER_DEPENDENCIES=auto work with DEVOPTS=pedantic”
  1. Makefile: make COMPUTE_HEADER_DEPENDENCIES=auto work with DEVOPTS=pedanticÆvar Arnfjörð Bjarmason, Sep 22, 2021
  2. Carlo ArenasSep 22, 2021
  3. Ævar Arnfjörð BjarmasonSep 22, 2021
  4. Junio C HamanoSep 22, 2021
  5. Jeff KingSep 22, 2021
  6. Junio C HamanoSep 22, 2021
  7. Carlo ArenasSep 22, 2021
  8. Jeff KingSep 22, 2021
  9. Carlo ArenasSep 22, 2021
  10. Ævar Arnfjörð BjarmasonSep 22, 2021
  11. Jeff KingSep 23, 2021
  12. Junio C HamanoSep 23, 2021
  13. Jeff KingSep 23, 2021
  14. Junio C HamanoSep 23, 2021
  15. Ævar Arnfjörð BjarmasonSep 22, 2021
  16. 0/2 Makefile: "pedantic" fallout on .depend and "compdb"Ævar Arnfjörð Bjarmason, Sep 22, 2021
  17. 1/2 Makefile: make COMPUTE_HEADER_DEPENDENCIES=auto work with DEVOPTS=pedanticÆvar Arnfjörð Bjarmason, Sep 22, 2021
  18. 2/2 Makefile: pass -Wno-pendantic under GENERATE_COMPILATION_DATABASE=yesÆvar Arnfjörð Bjarmason, Sep 22, 2021
  19. Carlo ArenasSep 23, 2021
  20. Junio C HamanoSep 23, 2021
  21. Jeff KingSep 23, 2021

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.