ecpg c++ scope operator lost

From: Mark Pether <mutex(at)redsheriff(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: ecpg c++ scope operator lost
Date: 2003-12-17 20:14:31
Message-ID: 3FE0B927.8060402@redsheriff.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Ecpg pretty prints my code causing compile errors.

ie. code to compile:

EXEC SQL BEGIN DECLARE SECTION;
char bound_waiting_state =
static_cast<char>(Processor::waiting);
EXEC SQL END DECLARE SECTION;

turns into:

/* exec sql begin declare section */
#line 90 "Schedule.pgcc"
char bound_waiting_state = static_cast < char > ( Processor : :
waiting ) ;
/* exec sql end declare section */
#line 93 "Schedule.pgcc"

The scope operator becomes space padded and compiler barfs.

Work around is to initialise variables outside of declare section.

Regards,
Mark Pether.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-12-17 20:18:06 Re: BUG #1011: Explain analyze "query" cause segv
Previous Message Gustavo Scotti 2003-12-17 19:56:51 Bugs in bigint indexes