issue with cpluspluscheck and systemtap - Mailing list pgsql-hackers

From Peter Eisentraut
Subject issue with cpluspluscheck and systemtap
Date
Msg-id 512ECBF0.5090807@gmx.net
Whole thread Raw
List pgsql-hackers
Newer versions of systemtap have some C++ code in their sys/sdt.h header
file (guarded by #ifdef __cpluplus).  cpluspluscheck ends up wrapping
all of that into extern "C" { ... }, which ultimately results in

In file included from ./src/include/utils/probes.h:9:0,                from ./src/include/pg_trace.h:15,
from/tmp/cpluspluscheck.VuUGok/test.cpp:3:
 
/usr/include/sys/sdt.h:71:1: error: template with C linkage
/usr/include/sys/sdt.h:81:1: error: template specialization with C linkage
/usr/include/sys/sdt.h:82:1: error: template specialization with C linkage

etc.

I don't think there is a way to escape back into C++ linkage inside an
extern "C" block.

If there is no better way, I suggest we exclude pg_trace.h and
utils/probes.h from cpluspluscheck.



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Database system identifier via SELECT
Next
From: Michael Paquier
Date:
Subject: Re: Support for REINDEX CONCURRENTLY