Does ecpg understand forward declarations?

From: Sam Liapis <Sam(dot)Liapis(at)constrainttec(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Does ecpg understand forward declarations?
Date: 2018-08-01 06:53:25
Message-ID: 8bf509d7-6777-9f85-17a2-8b493859b32e@constrainttec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

|I'm a newbie to postgresql and ecpg in particular. My brief is to
'convert' Oracle pro*C files ready for ecpg preprocessing. I've so far
struck what appears to be ecpg limitation such as multi-dim arrays,
function pointers and void type. But the one that's biting hard right
now is ecpg seems to be unaware of or ignores forward declarations. Take
the classic scenario of mutually dependent structs A & B shown below.
ECPG keeps bailing with "ERROR: unrecognized data type name struct B"
(at line 100) If I remove the forward declaration its the same error for
line 110 (|||structB*ptr;|) 100 structB; 101 102 structA {...110 structB*ptr;111
};112 113 structB {...120 structA*ptr;121 }; Can someone confirm this
indeed is a shortcoming of ecpg and suggest any way around it? Thanks, Sam |

Browse pgsql-interfaces by date

  From Date Subject
Next Message Sam Liapis 2018-08-01 07:10:51 Does ecpg understand forward declarations?
Previous Message Ashutosh Sharma 2018-07-25 05:01:16 Re: Host variables in ecpg