Tree-walker callbacks vs -Wdeprecated-non-prototype

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Tree-walker callbacks vs -Wdeprecated-non-prototype
Дата
Msg-id CA+hUKGKpHPDTv67Y+s6yiC8KH5OXeDg6a-twWo_xznKTcG0kSA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Tree-walker callbacks vs -Wdeprecated-non-prototype  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

As visible on seawasp (and noticed here in passing, while hacking on
the opaque pointer changes for bleeding edge LLVM), Clang 15 now warns
by default about our use of tree walkers functions with no function
prototype, because the next revision of C (C23?) will apparently be
harmonising with C++ in interpreting f() to mean f(void), not
f(anything goes).

nodeFuncs.c:2051:17: warning: passing arguments to a function without
a prototype is deprecated in all versions of C and is not supported in
C2x [-Wdeprecated-non-prototype]
                        return walker(((WithCheckOption *)
node)->qual, context);

Discussion trail:

https://reviews.llvm.org/D123456
https://discourse.llvm.org/t/rfc-enabling-wstrict-prototypes-by-default-in-c/60521
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2841.htm

Not sure where to see the official status of N2841 (other than waiting
for the next draft to pop out), but on random/unofficial social media
I saw that it was accepted in February, and the Clang people
apparently think it's in and I also saw a rumour that bleeding edge
GCC takes this view if you run with -std=c2x (not tested by me).



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Accessing git.postgresql.org fails
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Libpq single-row mode slowness