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 1l4naI-0006ZE-Ml for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Jan 2021 16:22:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l4naF-0007ly-8k for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Jan 2021 16:22:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l4naF-0007lr-1s for pgsql-hackers@lists.postgresql.org; Wed, 27 Jan 2021 16:22:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l4naC-0001vf-LL; Wed, 27 Jan 2021 16:22:18 +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 10RGMEPS2401576; Wed, 27 Jan 2021 11:22:14 -0500 From: Tom Lane To: pgsql-hackers@lists.postgresql.org cc: Michael Meskes Subject: Inconsistent function definitions in ECPG's informix.c MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2401574.1611764534.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 27 Jan 2021 11:22:14 -0500 Message-ID: <2401575.1611764534@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I noticed that some of the newer compilers in the buildfarm (e.g., caiman, with gcc 11.0) whine about the definitions of rjulmdy() and rmdyjul() not quite matching their external declarations: informix.c:516:23: warning: argument 2 of type `short int[3]' with mismatc= hed bound [-Warray-parameter=3D] 516 | rjulmdy(date d, short mdy[3]) | ~~~~~~^~~~~~ In file included from informix.c:10: ../include/ecpg_informix.h:38:31: note: previously declared as `short int = *' 38 | extern int rjulmdy(date, short *); | ^~~~~~~ informix.c:567:15: warning: argument 1 of type `short int[3]' with mismatc= hed bound [-Warray-parameter=3D] 567 | rmdyjul(short mdy[3], date * d) | ~~~~~~^~~~~~ In file included from informix.c:10: ../include/ecpg_informix.h:41:25: note: previously declared as `short int = *' 41 | extern int rmdyjul(short *, date *); | ^~~~~~~ This isn't a bug really, since per the C spec these declarations are equivalent. But it'd be good to silence the warning before it gets any more common. The most conservative thing to do would be to take the user-visible extern declarations as being authoritative, and change informix.c to match. I'm slightly tempted to do the opposite though, on the grounds that showing the expected lengths of the arrays is useful. But I wonder if anyone's compatibility checker tools would (mistakenly) classify that as an ABI break. Thoughts? regards, tom lane