Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHYQE-0002UI-3h for pgsql-bugs@arkaria.postgresql.org; Tue, 08 Feb 2022 21:53:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nHYQC-0003GM-QZ for pgsql-bugs@arkaria.postgresql.org; Tue, 08 Feb 2022 21:53:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHYQC-0003GB-IO for pgsql-bugs@lists.postgresql.org; Tue, 08 Feb 2022 21:53:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHYQ6-0000xY-MF for pgsql-bugs@lists.postgresql.org; Tue, 08 Feb 2022 21:53:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 218Lr16l1290987; Tue, 8 Feb 2022 16:53:01 -0500 From: Tom Lane To: "=?utf-8?B?aWxtYXJp?=" cc: "=?utf-8?B?V2VpIFN1bg==?=" <936739278@qq.com>, "=?utf-8?B?cGdzcWwtYnVncw==?=" Subject: Re: Build error in Solaris In-reply-to: <1176583.1644323289@sss.pgh.pa.us> References: <1176583.1644323289@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 08 Feb 2022 07:28:09 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1290985.1644357181.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 08 Feb 2022 16:53:01 -0500 Message-ID: <1290986.1644357181@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Hm. I saw something similar on my old dinosaur pademelon, but wrote it > off as "they don't care about pre-C99 compilers anymore". But now I > dug into ppport.h a bit more, and I think it's actually busted for > non-gcc compilers: eval_pv expands into something that tries to use > STMT_START/STMT_END inside a plain parenthesized expression (via > croak_sv). > Maybe the bleeding edge Devel::PPPort would do better? I see Nope, 3.64 is also broken. I traced this to this stanza, originally added in Devel-PPPort 3.54: /* Older Perl versions have broken croak_on_error=3D1 */ #if (PERL_BCDVERSION < 0x5031002) # ifdef eval_pv # undef eval_pv # if defined(PERL_USE_GCC_BRACE_GROUPS) # define eval_pv(p, croak_on_error) ({ SV *_sv =3D Perl_eval_pv(aTHX_ p,= 0); D_PPP_CROAK_IF_ERROR(croak_on_error); _sv; }) # else # define eval_pv(p, croak_on_error) ((PL_Sv =3D Perl_eval_pv(aTHX_ p, 0)= ), D_PPP_CROAK_IF_ERROR(croak_on_error), PL_Sv) # endif # endif #endif D_PPP_CROAK_IF_ERROR goes to croak_sv which, in older Perl versions, produces a statement block. So anything that won't accept gcc-like statements within expressions blows up. Now, we don't actually *care* about the case this is trying to fix, because all our eval_pv usages pass constant-FALSE for croak_on_error. (Possibly not unrelated to the bug implied by the above comment ... but I digress.) Therefore, pending a resolution to the issue I just filed [1], I suggest that we just dike this stanza out of our copy of ppport.h. regards, tom lane [1] https://github.com/Dual-Life/Devel-PPPort/issues/216