Subject: Does ecpg understand forward declarations?

From: Sam Liapis <[email-masked]>
Date: Wed, 1 Aug 2018 16:53:25 +1000

|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 |