Re: Fooling ProC precompiler

From: Dave <recneps.w.divad_at_elcaro.moc>
Date: Fri, 28 Jan 2005 13:06:13 +0000
Message-ID: <G0rKd.21$qt6.81_at_news.oracle.com>


barthome1_at_comcast.net wrote:
> Hello,
>
> I have observed some unwelcome behavior in the proc precompiler and was
> hoping someone knew how to get around it.
>
> In my .pc file I have the line:
> EXEC SQL WHENEVER SQLERROR DO sql_error ((char *)"In putWLOB"):
>
> The resultant .cxx file has
> if (sqlca.sqlcode <0) sql_error("In putWLOB):
>
> It loses the casting the string literal to a char pointer. This makes
> my compier grumpy. Is there a way to get the casting to stay?
> Thanks
>
> Bart
> barthome1_at_comcast.net
>

It's easily fooled; its C parser is a bit retarded. Same problem in 10.1.0.3 (the cast is lost). How is sql_error() defined, what compiler options are you using, and what compiler messages do you get?

Possible solutions: suppress the warnings (assuming they're not errors and that everything works despite the compiler's whinging), or redefine sql_error so that the cast is unnecessary. Received on Fri Jan 28 2005 - 14:06:13 CET

Original text of this message