pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: tableam.h fails cpluspluscheck
Date: Thu, 30 May 2019 14:01:00 -0400
Message-ID: <53941.1559239260@sss.pgh.pa.us> (raw)

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 different 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





view thread (3+ messages)  latest in thread

Message-ID: <53941.1559239260@sss.pgh.pa.us>
Permalink:  ../53941.1559239260@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/53941.1559239260@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: tableam.h fails cpluspluscheck
  In-Reply-To: <53941.1559239260@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox