From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> |
Cc: | pgsql-interfaces(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org> |
Subject: | Re: ecpg: issue related to preprocessor directives |
Date: | 2020-08-01 14:35:31 |
Message-ID: | 1925404.1596292531@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
I wrote:
> Looking at pgc.l, it seems that 'elif' is treated as though it were
> 'endif' followed by 'ifdef', which of course completely loses the
> expected property that a previous successful branch would keep the
> elif branch from being expanded.
> While this doesn't look terribly hard to fix, I'm a little disturbed
> by the fact that the existing semantics seem to date back to 1999
> (b57b0e044). We're probably risking breaking existing app code if
> we change it. I think we *should* change it, of course, but I'm kind
> of inclined not to back-patch.
Here's a proposed patch, which also clarifies the documentation,
which seemed a bit confused/misleading to me.
As stated, I'm not sure it's wise to back-patch this aggressively
... but maybe it'd be okay to squeeze it into v13?
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
fix-ecpg-elif-1.patch | text/x-diff | 23.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Sharma | 2020-08-03 10:30:06 | Re: ecpg: issue related to preprocessor directives |
Previous Message | Tom Lane | 2020-08-01 00:06:31 | Re: ecpg: issue related to preprocessor directives |