Thread: pgsql/src/interfaces/ecpg/preproc pgc.l

pgsql/src/interfaces/ecpg/preproc pgc.l

From
tgl@postgresql.org (Tom Lane)
Date:
CVSROOT:    /cvsroot
Module name:    pgsql
Changes by:    tgl@postgresql.org    02/03/24 13:22:21

Modified files:
    src/interfaces/ecpg/preproc: pgc.l

Log message:
    Indenting #if commands is not portable, is it?


Re: pgsql/src/interfaces/ecpg/preproc pgc.l

From
Bruce Momjian
Date:
Tom Lane wrote:
> CVSROOT:    /cvsroot
> Module name:    pgsql
> Changes by:    tgl@postgresql.org    02/03/24 13:22:21
>
> Modified files:
>     src/interfaces/ecpg/preproc: pgc.l
>
> Log message:
>     Indenting #if commands is not portable, is it?

Correct.  For those curious:

    !       #ifdef HAVE_LONG_INT_64

should probably be:

    ! #    ifdef HAVE_LONG_INT_64

I have seen the part after the # indented effectively.  However, we
don't normally even bother with that in our code.  Seems I added this
bug trying to indent a block of code.  Funny I got no errors on the
compile.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: pgsql/src/interfaces/ecpg/preproc pgc.l

From
Thomas Lockhart
Date:
> ...  Funny I got no errors on the compile.

Because it is a portability concern, not an impossibility. afaik the
compilers I use on projects allow indenting, but most of them have gcc
lineage.

                   - Thomas