From: Michael Meskes <meskes@postgresql.org>
To: pgsql-bugs@postgresql.org
Cc: digoal@126.com
Subject: Re: BUG #14167: ecpg parser cann't ignore code in #ifdef ?
Date: Wed, 01 Jun 2016 15:43:00 +0200
Message-ID: <1464788580.21529.25.camel@postgresql.org> (raw)
In-Reply-To: <20160601033334.30388.39448@wrigleys.postgresql.org>
References: <20160601033334.30388.39448@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
> this is my pgc code.
> ...
> #ifdef ABC
> err *abc;
> #endif
> ...
> this is ERROR
> ecpg -t -c -I/home/digoal/pgsql9.6/include -o t.c t.pgc
> t.pgc:15: ERROR: unrecognized data type name "err"
>
> And use #ifndef and -DABC also error.
> ECPG parser cann't skip code in #ifdef or #ifndef ?
'#ifdef' is a C precompiler command and thus is only parsed by cpp et
al. If you want ecpg to parse it you have to use 'exec sql ifdef'
instead.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: meskes@postgresql.org, digoal@126.com
Subject: Re: BUG #14167: ecpg parser cann't ignore code in #ifdef ?
In-Reply-To: <1464788580.21529.25.camel@postgresql.org>
References: <20160601033334.30388.39448@wrigleys.postgresql.org> <1464788580.21529.25.camel@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox