Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXTjZ-0003xy-TB for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Jun 2019 16:53:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hXTjY-0007hy-4r for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Jun 2019 16:53:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXTjX-0007hr-P7 for pgsql-hackers@lists.postgresql.org; Sun, 02 Jun 2019 16:53:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXTjQ-0001US-AF for pgsql-hackers@lists.postgresql.org; Sun, 02 Jun 2019 16:53:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x52GrEmE020519 for ; Sun, 2 Jun 2019 12:53:14 -0400 From: Tom Lane To: pgsql-hackers@lists.postgresql.org Subject: Residual cpluspluscheck issues MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20517.1559494394.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 02 Jun 2019 12:53:14 -0400 Message-ID: <20518.1559494394@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk cpluspluscheck's expanded coverage is now passing cleanly for me on the macOS laptop I was testing it with at PGCon. But on returning home, I find there's still some issues on some other boxes: * On Linux (at least Fedora and RHEL), I get variants of this: /usr/include/arpa/inet.h:84: error: declaration of 'char* inet_net_ntop(in= t, const void*, int, char*, size_t) throw ()' throws different exceptions /home/postgres/pgsql/src/include/port.h:506: error: from previous declarat= ion 'char* inet_net_ntop(int, const void*, int, char*, size_t)' That's because /usr/include/arpa/inet.h declares it as extern char *inet_net_ntop (int __af, const void *__cp, int __bits, char *__buf, size_t __len) __THROW; and of course when a C++ compiler reads that, __THROW will expand as something nonempty. One possible fix for that is to teach configure to test whether arpa/inet.h provides a declaration, and not compile our own declaration when it does. This would require being sure that we include arpa/inet.h anywhere we use that function, but there are few enough callers that that's not much of a hardship. Alternatively, we could rename our function to pg_inet_net_ntop to dodge the conflict. This might be a good idea anyway to avoid confusion, since our function doesn't necessarily recognize the same address-family codes that libc would. * On FreeBSD 12, I get /home/tgl/pgsql/src/include/utils/hashutils.h:23:23: warning: 'register' s= torage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] extern Datum hash_any(register const unsigned char *k, register int keylen= ); ^~~~~~~~~ /home/tgl/pgsql/src/include/utils/hashutils.h:23:56: warning: 'register' s= torage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] extern Datum hash_any(register const unsigned char *k, register int keylen= ); ^~~~~~~~~ /home/tgl/pgsql/src/include/utils/hashutils.h:24:32: warning: 'register' s= torage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] extern Datum hash_any_extended(register const unsigned char *k, ^~~~~~~~~ /home/tgl/pgsql/src/include/utils/hashutils.h:25:11: warning: 'register' s= torage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] register int ..= . ^~~~~~~~~ which I'm inclined to think means we should drop those register keywords. (The FreeBSD box shows another couple of complaints too, but I think the fixes for those are uncontroversial.) Comments? regards, tom lane