Search code examples
coraclegnuoracle-pro-c

while preprocessing with gnuC how to remove __extension__


I need to use Oracle pro*C for dealing with EXEC SQL declaration. However I've got some macros in the SQL part that I want to replace by preprocessing with gnuC.

The problem is that from version 4, gnuC preprocessing adds keywords like __extension__. The pro*C preprocessor rejects __extension__ with the following message:

Syntax error at line 16, column 15, file xxx.ppc:
Error at line 16, column 15 in file xxx.ppc
__extension__ typedef unsigned long long int __u_quad_t;
..............1
PCC-S-02201, Encountered the symbol "typedef" when expecting one of the followin
g:

   ; , = ( [
The symbol ";" was substituted for "typedef" to continue.

How to make gnuC not to produce those keywords?

Thanks


Solution

  • It seems that we can almost do it the other way: relaxing pro*C requirements, using the argument parse=partial.

    See: https://stackoverflow.com/a/2468655/185460

    But in this case the macro used in VARCHAR declarations for example are not replaced. So the problem remains!