On 2020-09-03 19:36, Tom Lane wrote:
At least, that's what I got when I reinstalled Xcode just now on my Catalina machine. It does not exhibit this behavior. I see$ clang -c c.c c.c:1:14: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration] int main() { exit(0); } ^ c.c:1:14: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' 1 warning generated. and PG configure and build goes through just fine. Smells like an Apple bug from here. Surely they're not expecting that anyone will appreciate -Werror suddenly being the default.
IIRC, calling an undeclared function is (or may be?) an error in C99. So perhaps the implicit -Werror only applies to this particular warning class.
I suppose backpatching the patch that fixed this would be appropriate. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
