Re: C++ Headers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: mscott(at)sacadia(dot)com, Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: C++ Headers
Date: 2001-05-20 00:34:22
Message-ID: 7594.990318862@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> The only mention I see of this is in c.h:

> #ifndef __cplusplus
> #ifndef bool
> typedef char bool;

> #endif /* ndef bool */
> #endif /* not C++ */

> If you need more cplusplus stuff, lets figure it out and add it.

Actually, that portion of c.h is a time bomb that is likely to blow up
in the face of some poor C++ user. There's no guarantee that a C++
compiler's built-in bool type will be compatible with "char", is there?
If it happened to be, say, same size as "int", then a C++ module
would interpret lots of things differently from a C module.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-05-20 00:38:25 Re: Fix for tablename in targetlist
Previous Message Tom Lane 2001-05-20 00:26:00 Re: Fix for tablename in targetlist