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

From Tom Lane
Subject Re: BUG #13898: ecpg complains on nested comments in /usr/pgsql-9.4/include/informix/esql/datetime.h
Date
Msg-id 68728.1454320604@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #13898: ecpg complains on nested comments in /usr/pgsql-9.4/include/informix/esql/datetime.h  (Michael Meskes <meskes@postgresql.org>)
Responses Re: BUG #13898: ecpg complains on nested comments in /usr/pgsql-9.4/include/informix/esql/datetime.h  (Michael Meskes <meskes@postgresql.org>)
Re: BUG #13898: ecpg complains on nested comments in /usr/pgsql-9.4/include/informix/esql/datetime.h  (Michael Meskes <meskes@postgresql.org>)
Re: BUG #13898: ecpg complains on nested comments in /usr/pgsql-9.4/include/informix/esql/datetime.h  (Michael Meskes <meskes@postgresql.org>)
List pgsql-bugs
Michael Meskes <meskes@postgresql.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

pgsql-bugs by date:

Previous
From: Michael Meskes
Date:
Subject: Re: BUG #13898: ecpg complains on nested comments in /usr/pgsql-9.4/include/informix/esql/datetime.h
Next
From: Michael Meskes
Date:
Subject: Re: BUG #13898: ecpg complains on nested comments in /usr/pgsql-9.4/include/informix/esql/datetime.h