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 1hWPNT-0004pF-Bk for pgsql-hackers@arkaria.postgresql.org; Thu, 30 May 2019 18:02:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hWPMS-00044C-Tm for pgsql-hackers@arkaria.postgresql.org; Thu, 30 May 2019 18:01:08 +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 1hWPMS-000445-Hd for pgsql-hackers@lists.postgresql.org; Thu, 30 May 2019 18:01:08 +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 1hWPMQ-0002Y8-Bc for pgsql-hackers@lists.postgresql.org; Thu, 30 May 2019 18:01:07 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x4UI10BD029743; Thu, 30 May 2019 14:01:00 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@lists.postgresql.org Subject: tableam.h fails cpluspluscheck MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <53940.1559239260.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 30 May 2019 14:01:00 -0400 Message-ID: <53941.1559239260@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Using Apple's clang as c++ compiler: In file included from /tmp/cpluspluscheck.KejiIw/test.cpp:3: ./src/include/access/tableam.h:144:16: error: typedef redefinition with di= fferent types ('void (*)(Relation, HeapTuple, Datum *, bool *, bool, void = *)' (aka 'void (*)(RelationData *, HeapTupleData *, unsigned long *, bool = *, bool, void *)') vs 'IndexBuildCallback') typedef void (*IndexBuildCallback) (Relation index, ^ ./src/include/access/tableam.h:36:8: note: previous definition is here struct IndexBuildCallback; ^ (there are some cascading errors, but this is the important one) Kinda looks like you can't get away with using "struct" on a forward declaration of something that is not actually a struct type. regards, tom lane