Re: [HACKERS] psql vs. gcc

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] psql vs. gcc
Date: 1999-12-18 13:06:28
Message-ID: Pine.LNX.4.21.9912180303440.1139-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1999-12-17, Tom Lane mentioned:

> After looking at my C reference, I believe gcc is following the ANSI C
> spec and Peter's code is broken. According to the book I'm looking at,
> concatenation of adjacent string literals is specified to happen while
> forming preprocessing tokens, which obviously must occur *before*
> preprocessor directives are evaluated. (#if throws away preprocessing
> tokens, not raw characters...) So when MULTIBYTE is defined, an
> ANSI-compliant compiler will see a syntax error in the above.

I usually compile all code with both gcc 2.8.1 and egcs 2.91.66 and make
it -Wall -W proof. So I must consider that an omission in those compilers.
Thanks for pointing it out.

> > describe.c:324: warning: preprocessing directive not recognized within macro arg
>
> Looks like there are a few other problems here too...

The problem sounds more like strcpy is a macro now. Great. More macros.
Just what I need. :)

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 1999-12-18 13:06:47 Re: [HACKERS] psql compile errors
Previous Message Bruce Momjian 1999-12-18 06:13:31 Re: [HACKERS] LONG varsize - how to go on