Re: BUG #13898: ecpg complains on nested comments in /usr/pgsql-9.4/include/informix/esql/datetime.h

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Vladimir Zvagolskiy <Vladimir(dot)Zvagolskiy(at)nasdaq(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13898: ecpg complains on nested comments in /usr/pgsql-9.4/include/informix/esql/datetime.h
Date: 2016-02-01 09:56:44
Message-ID: 68728.1454320604@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Meskes <meskes(at)postgresql(dot)org> writes:
> On Mon, Feb 01, 2016 at 08:59:17AM +0000, Vladimir Zvagolskiy wrote:
>> Until I've done the described modification in datetime.h

> Anyway, I cannot see a nested comment in that version either. Could you send a small test case to reproduce? Thanks.

It seems a bit fishy that the comment in question starts on an #if line
and ends on an ordinary line. I am not sure what the C standard says
about such cases, but I can certainly imagine that some tools might not
be very happy with that.

It looks like that code was last touched by pgindent in d747140279426607:

-#ifndef _ECPGLIB_H /* source created by ecpg which defines these symbols */
+#ifndef _ECPGLIB_H /* source created by ecpg which defines these
+ * symbols */

Perhaps that was a bad change, and you should make it look like

/* helpful comment here */
#ifndef _ECPGLIB_H

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Vladimir Zvagolskiy 2016-02-01 10:23:00 Re: BUG #13898: ecpg complains on nested comments in /usr/pgsql-9.4/include/informix/esql/datetime.h
Previous Message roland.ziegler 2016-02-01 09:47:37 BUG #13904: Postgres “cannot assign non-composite value to a row variable” error assigning a composite value