Home » Developer & Programmer » Precompilers, OCI & OCCI » ANSI_C or not ?
ANSI_C or not ? [message #94390] Tue, 28 September 2004 08:19
jrman
Messages: 5
Registered: September 2004
Junior Member
Hi all,

I work with Oracle 8.1.7
In my pre compiler makefile I have this option:


PROCFLAGS=CODE=ANSI_C
The pro*c compiler generates code like:


static struct sqltdss sqltds =
{
  1,
  0,

};
OR
extern sqlbuft(/*_ void **, char * _*/);
OR
static struct sqlexd {
   unsigned int   sqlvsn;
} sqlstm = {10,9}; THIS GLOBAL DECLARATION
+
void funct1() {
struct sqlexd sqlstm;IN MY FUNCT1 FUNCTION

Of course, I got a lot of warning when gcc compiles its ansi c compliant code.

toto.c:43: warning: missing initializer
toto.c:43: warning: (near initialization for `sqladt.adttvn')
toto.c:57: warning: missing initializer
toto.c:57: warning: (near initialization for `sqltds.tdsval')
toto.c:106: warning: missing initializer
toto.c:106: warning: (near initialization for `sqlstm.iters')
toto.c:109: warning: type defaults to `int' in declaration of `sqlcxt'
toto.c:109: warning: function declaration isn't a prototype
toto.c:111: warning: type defaults to `int' in declaration of `sqlcx2t'
toto.c:111: warning: function declaration isn't a prototype
toto.c:113: warning: type defaults to `int' in declaration of `sqlbuft'
toto.c:113: warning: function declaration isn't a prototype
toto.c:114: warning: type defaults to `int' in declaration of `sqlgs2t'
toto.c:114: warning: function declaration isn't a prototype
toto.c:115: warning: type defaults to `int' in declaration of `sqlorat'
toto.c:115: warning: function declaration isn't a prototype
toto.c:121: warning: function declaration isn't a prototype
toto.c: In function `funct1':
toto.c:250: warning: declaration of `sqlstm' shadows a global declaration
toto.c:106: warning: shadowed declaration is here


Did anyone succeed in doing it generating real ansi c code ?

Best regards,
jrman
Previous Topic: List available DBs
Next Topic: run command in unx
Goto Forum:
  


Current Time: Thu Mar 28 10:39:54 CDT 2024