| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Winter Loo" <winterloo(at)126(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [ecpg bug]: can not use single '*' in multi-line comment after c preprocessor directives |
| Date: | 2024-09-26 19:04:58 |
| Message-ID: | 349006.1727377498@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
"Winter Loo" <winterloo(at)126(dot)com> writes:
> The following code fails to pass the ecpg compilation, although it is accepted by the gcc compiler.
Yeah ... an isolated "/" inside the comment doesn't work either.
> Confused! I am uncertain how to rectify the regex. I hope someone can address this bug.
I poked at this for awhile and concluded that we probably cannot make
it work with a single regexp for "cppline". The right thing would
involve an exclusive start condition for parsing a cppline, more or
less like the way that /* comments are parsed in the <xc> start
condition. This is kind of a lot of work compared to the value :-(.
Maybe somebody else would like to take a crack at it, but I can't
get excited enough about it.
There are other deficiencies too in ecpg's handling of these things,
like the fact that (I think) comments are mishandled in #include
directives.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2024-09-26 20:06:51 | Re: Retiring is_pushed_down |
| Previous Message | Nathan Bossart | 2024-09-26 18:58:24 | Re: miscellaneous pg_upgrade cleanup |