Re: C++ keywords in headers (was Re: [GENERAL] #include ) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: C++ keywords in headers (was Re: [GENERAL] #include )
Date
Msg-id 18101.1293474097@sss.pgh.pa.us
Whole thread Raw
In response to Re: C++ keywords in headers (was Re: [GENERAL] #include )  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: C++ keywords in headers (was Re: [GENERAL] #include )  (Peter Geoghegan <peter.geoghegan86@gmail.com>)
List pgsql-hackers
BTW, the cpluspluscheck script invokes g++ with -fno-operator-names,
saying
# -fno-operator-names omits the definition of bitand and bitor, which# collide with varbit.h.  Could be fixed, if one
wereso inclined.
 

I just confirmed that those two function definitions are the only issues
that currently show up if one removes the switch.  Now, I'm not that
concerned about whether C++ users can include varbit.h ... but if we're
really going to use this technique to check whether C++ can include
headers, I think we've got to get rid of that switch, or we'll get
bitten elsewhere.

I propose renaming bitand() and bitor() to bit_and and bit_or() ...
any objections?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: C++ keywords in headers (was Re: [GENERAL] #include )
Next
From: Joel Jacobson
Date:
Subject: UPDATE pg_catalog.pg_proc.prosrc OK?