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

Re: [PATCH] config.mak.dev: enable -Wpedantic in clang

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 29, 2018, 05:13 UTC
Message-ID
<xmqqva4gpits.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAPig+cQXkNo_Sztf3y5ciZ3jjj=XrJ+ESCxEsU_RKxb_0x+STw@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 8 quoted lines
> Playing Devi's Advocate, what if Apple's clang "8" was, in reality,
> real-world clang 3? Then this condition would incorrectly enable the
> compiler option on Apple for a (real) clang version below 4. For this
> reason, it seems we shouldn't be trusting only the clang version
> number when dealing with Apple.
>
> (I suspect that it won't make a difference in actual practice, so it
> may be reasonable to punt on this issue until/if someone complains.)

Why do we care which true version of clang is being used here in the first place? Is it because some version of clang (take -Wpedantic but misbehave | barf when -Wpedantic is given) while some others are OK?

If the only problem is that some version of clang barf when the option is given, perhaps we can do a trial-compile of helloworld.c or something, or is that something we are trying to avoid in the first place?

It appears to me that ./detect-compiler tool (by the way, perhaps we should start moving these build-helper-tools sitting at the top level down to ./build-helpers/ subdirectory or something so that we can focus on the source code when running "ls" at the top level of the hierarchy) can become more intelligent to help things like this.

Previous: Eric Sunshine
Message 5 of 5 in “config.mak.dev: enable -Wpedantic in clang”
  1. config.mak.dev: enable -Wpedantic in clangCarlo Marcelo Arenas Belón, Nov 27, 2018
  2. Eric SunshineNov 27, 2018
  3. Carlo ArenasNov 27, 2018
  4. Eric SunshineNov 27, 2018
  5. Junio C HamanoNov 29, 2018

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.