Clang 15 makes implicit function declarations an error by default (see https://releases.llvm.org/15.0.0/tools/clang/docs/ReleaseNotes.html#improvements-to-clang-s-diagnostics)
I get the following error when trying to build pinentry 1.2.1 on Gentoo with Clang 15:
clang -DHAVE_CONFIG_H -I. -I..   -I../secmem -Wall -I/usr/include/ncursesw  -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -Wall -Wno-pointer-sign -Wpointer-arith -c -o libpinentry_curses_a-pinentry-curses.o `test -f 'pinentry-curses.c' || echo './'`pinentry-curses.c
pinentry-curses.c:651:8: error: call to undeclared function 'addnwstr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
              ADDCH (start[i]);
              ^
pinentry-curses.c:283:18: note: expanded from macro 'ADDCH'
#define ADDCH(x) addnwstr (&x, 1);
                 ^
pinentry-curses.c:651:8: note: did you mean 'addnstr'?
pinentry-curses.c:283:18: note: expanded from macro 'ADDCH'
#define ADDCH(x) addnwstr (&x, 1);
                 ^
/usr/include/ncursesw/curses.h:609:28: note: 'addnstr' declared here
extern NCURSES_EXPORT(int) addnstr (const char *, int);                 /* generated */
                           ^
pinentry-curses.c:654:6: error: call to undeclared function 'addnwstr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            ADDCH (start[len - 1]);
            ^
pinentry-curses.c:283:18: note: expanded from macro 'ADDCH'
#define ADDCH(x) addnwstr (&x, 1);
                 ^
pinentry-curses.c:687:7: error: call to undeclared function 'addnwstr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                    ADDCH (*p);
                    ^
pinentry-curses.c:283:18: note: expanded from macro 'ADDCH'
#define ADDCH(x) addnwstr (&x, 1);
                 ^
pinentry-curses.c:724:8: error: call to undeclared function 'addnwstr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
              ADDCH (*(p++));
              ^
pinentry-curses.c:283:18: note: expanded from macro 'ADDCH'
#define ADDCH(x) addnwstr (&x, 1);
                 ^
4 errors generated.
make[2]: *** [Makefile:473: libpinentry_curses_a-pinentry-curses.o] Error 1
make[2]: *** Waiting for unfinished jobs....Full log:
config.log: