Re: pgsql: Make typeof and typeof_unqual fallback definitions work on C++11
| От | Tom Lane |
|---|---|
| Тема | Re: pgsql: Make typeof and typeof_unqual fallback definitions work on C++11 |
| Дата | |
| Msg-id | 2055744.1773597906@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: pgsql: Make typeof and typeof_unqual fallback definitions work on C++11 (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-committers |
I wrote:
> Doesn't appear to have satisfied any of the previously-broken animals
> either. It looks like the C compiler is okay but building bitcode
> with clang is not okay. We're really going to need separate
> definitions for the two cases.
After noting that ladybug is one of the failing animals, I was
able to reproduce the failure locally on a Fedora 40 installation.
This system has
$ gcc --version
gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)
$ g++ --version
g++ (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)
$ clang --version
clang version 18.1.8 (Fedora 18.1.8-2.fc40)
So far as I can tell, this version of clang does not recognize
__typeof_unqual__ at all. It will take typeof_unqual, but only
with -std=c23 which we are not passing it. So the short answer
is that this is not good enough:
We test the underscore variant first so that there is a higher chance
that clang used for bitcode also supports it, since we don't test that
separately.
We could get away with not checking clang separately as long as
we weren't using any bleeding-edge C features, but this patch
is trying to do exactly that. I think we are going to have to
explicitly check all three of CC, CXX, CLANG and cope with the
case that they're all different on this point.
regards, tom lane
В списке pgsql-committers по дате отправления: