Re: -Wunreachable-code-generic-assoc warnings on elver

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: -Wunreachable-code-generic-assoc warnings on elver
Date: 2022-12-10 20:28:14
Message-ID: CA+hUKGKFWnTByQWo918xas9ZuUnGiM982-ddizdTYEwSM-yaFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 10, 2022 at 3:50 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Recently, buildfarm member elver has started spewing literally
> thousands of $SUBJECT:
>
> elver | 2022-12-10 01:17:29 | ../../src/include/utils/float.h:223:33: warning: due to lvalue conversion of the controlling expression, association of type 'volatile float' will never be selected because it is qualified [-Wunreachable-code-generic-assoc]
> elver | 2022-12-10 01:17:29 | ../../src/include/utils/float.h:223:33: warning: due to lvalue conversion of the controlling expression, association of type 'volatile double' will never be selected because it is qualified [-Wunreachable-code-generic-assoc]
> elver | 2022-12-10 01:17:29 | ../../src/include/utils/float.h:223:33: warning: due to lvalue conversion of the controlling expression, association of type 'volatile long double' will never be selected because it is qualified [-Wunreachable-code-generic-assoc]
> [ etc etc, about 9200 times per build ]
>
> I have no idea what that means, and consulting the clang documentation
> didn't leave me much wiser. I do see that a lot of these seem to be
> associated with isnan() calls, which makes me guess that clang does
> not play nice with however isnan() is declared on that box.

It was using LLVM and clang 15 for the JIT support (the base compiler
cc is clang 13 on this system, but CLANG is set to 15 for the .bc
files, to match the LLVM version). Apparently clang 15 started
issuing a new warning for math.h. That header has since been
adjusted[1] to fix that, but that's not going to show up in the
release that elver's using for a while. I've told it to use
LLVM/clang 14 instead for now; let's see if that helps.

[1] https://github.com/freebsd/freebsd-src/commit/8432a5a4fa3c4f34acf6136a9077b9ab7bbd723e

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2022-12-10 20:41:09 Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX
Previous Message Justin Pryzby 2022-12-10 20:17:53 Re: ExecRTCheckPerms() and many prunable partitions (checkAsUser)