Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur
Date
Msg-id 9b4bb5da-9ed9-4078-a16b-4755f0d578a4@2ndquadrant.com
Whole thread Raw
In response to Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: history file on replica and double switchover
Next
From: Tom Lane
Date:
Subject: Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur