public inbox for [email protected]  
help / color / mirror / Atom feed
Does ecpg understand forward declarations?
2+ messages / 1 participants
[nested] [flat]

* Does ecpg understand forward declarations?
@ 2018-08-01 06:53 Sam Liapis <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Sam Liapis @ 2018-08-01 06:53 UTC (permalink / raw)
  To: 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 |



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Does ecpg understand forward declarations?
@ 2018-08-01 07:10 Sam Liapis <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Sam Liapis @ 2018-08-01 07:10 UTC (permalink / raw)
  To: pgsql-interfaces

[Retransmitting from MS mail client in the hope message is well formatted]

 

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 (struct
B* ptr;)

 

100  struct B;

101

102 struct A {

         ...

110      struct B* ptr;

111  };

112

113  struct B {

         ...

120      struct A* ptr;

121 };

 

Can someone confirm this indeed is a shortcoming of ecpg and suggest any way
around it?

 

Thanks,

Sam



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-08-01 07:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 06:53 Does ecpg understand forward declarations? Sam Liapis <[email protected]>
2018-08-01 07:10 Does ecpg understand forward declarations? Sam Liapis <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox