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

Re: [PATCH] config.mak.dev: fix typo when enabling -Wpedantic

From
Jeff King <peff@peff.net>
Date
Jul 6, 2024, 23:13 UTC
Message-ID
<20240706231304.GB746087@coredump.intra.peff.net>
In-Reply-To
<Zolim6llm3cphdTT@nand.local>
On Sat, Jul 06, 2024 at 11:15:43AM -0400, Taylor Blau wrote:
Show 19 quoted lines
> > But why does make complain here only sometimes? Does it depend on the
> > version of make?
> 
> It seems to depend on the version of make you're using. On my system,
> 'make' is GNU Make 4.4.90, which has the more restrictive checks around
> the recipe prefix in nested conditionals.
> 
> With that version (and the pre-image of this commit), I get:
> 
>     $ make -v | head -1 && make DEVELOPER=1 2>&1 | head -1
>     GNU Make 4.4.90
>     config.mak.dev:13: extraneous text after 'ifneq' directive
> 
> , but with /usr/bin/make (which on my machine is GNU Make 4.3), I
> instead get:
> 
>     $ /usr/bin/make -v | head -1 && /usr/bin/make DEVELOPER=1 2>&1 | head -1
>     GNU Make 4.3
>     GIT_VERSION = 2.45.2.746.g06e570c0df

Ah, thanks for digging. That makes perfect sense (I'm on 4.3 from Debian unstable).

Show 11 quoted lines
> On Sat, Jul 06, 2024 at 11:15:43AM -0400, Taylor Blau wrote:
> > It is tempting to just want to rip out support for older compilers, but
> > given that ebd2e4a13a (Makefile: restrict -Wpedantic and
> > -Wno-pedantic-ms-format better, 2021-09-28) is only three years old, I
> > imagine that some builders may still want support for older / pre-GCC 4
> > compilers.
> 
> Hmm... thinking on it more, edb2e4a13a hasn't been working at all on the
> older versions of Make that people with ancient compilers are likely
> also using. So it's possible that that commit isn't doing as much as we
> think, in which case we could rip it out altogether.

Right, that's what I meant by "nobody seems to have complained". But as you note, it's not like it gets rid of the detect-compiler script. It's just this one check. So it doesn't hurt much to leave it.

-Peff
Previous: Taylor Blau
Message 6 of 6 in “config.mak.dev: fix typo when enabling -Wpedantic”
  1. config.mak.dev: fix typo when enabling -WpedanticTaylor Blau, Jul 5, 2024
  2. Elijah NewrenJul 5, 2024
  3. Jeff KingJul 6, 2024
  4. Taylor BlauJul 6, 2024
  5. Taylor BlauJul 6, 2024
  6. Jeff KingJul 6, 2024

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.