ecpg c++ scope operator lost - Mailing list pgsql-bugs

From Mark Pether
Subject ecpg c++ scope operator lost
Date
Msg-id 3FE0B927.8060402@redsheriff.com
Whole thread Raw
Responses Re: ecpg c++ scope operator lost
List 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.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1020: Timestamp representation printed by PostgreSQL are invalid
Next
From: "Gustavo Scotti"
Date:
Subject: Bugs in bigint indexes