warning message "E_NO_EXPLICIT_TYPE_GIVEN"
807578Oct 1 2002 — edited Mar 26 2010Hi All,
Currently I am using c compiler from Forte Developer 7 and experienced some warning messages when compiling my c programs. I realise that this kind of warning messages did not appear on the screen when I used the previous compiler version.
The complete warning messages can be shown like below,
"sample2.c", line 109: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
"sample2.c", line 111: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
"sample2.c", line 113: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
"sample2.c", line 114: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
"sample2.c", line 115: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
When I look at the source code "sample2.c" :
109: extern sqlcxt (/*_ void **, unsigned int *,
110: struct sqlexd *, struct sqlcxp * _*/);
111: extern sqlcx2t(/*_ void **, unsigned int *,
112: struct sqlexd *, struct sqlcxp * _*/);
113: extern sqlbuft(/*_ void **, char * _*/);
114: extern sqlgs2t(/*_ void **, char * _*/);
115: extern sqlorat(/*_ void **, unsigned int *, void * _*/);
As You can see, all of them start with keyword 'extern'.
I ever learned C programming, so realised that all of external procedure must be declared by 'extern' keyword and also follow by 'return-type', whether it is a void or int or char, or other data type.
For your information this code is not written by developer/programmer, but it is produced by Oracle precompiler ( proc ). The original source code is a .pc ( sample2.pc).Then it was to be compiled by proc to become sample2.c. Eventually sample2.c will be compiled by cc to be sample2.o and link to sample2 as its executable file.
My question is how to configure the c compiler ( cc ), so this kind of syntax will be accepted by compiler as a correct way ?
I know c compiler has option to suppress all warning messages or particular messages, but i don't want to choose this way.
cheers,
Alianto