buntatsu / cdt-proc

Eclipse CDT extension for Oracle Pro*C
Eclipse Public License 1.0
26 stars 7 forks source link

Syntax error in queries using agratation functinos defined as C macros #13

Closed gdsotirov closed 8 years ago

gdsotirov commented 8 years ago

We're having some Pro*C sources into which there is defined C macro named "max" and SQL queries using the function "max" to calculate some results. In Eclipse CDT with Proc extension this results in syntax error "Macro usage error" (illustrated below) on these queries.

ecdt_proc_max_macro_err

Follows the example code:

EXEC SQL INCLUDE sqlca.h;

#define max(A,B) ((A) > (B) ? (A) : (B))

int main(int argc, char * argv[])
{
  int res;

  EXEC SQL SELECT max(1)
           INTO :res
           FROM dual;
}
gdsotirov commented 8 years ago

Confirmed fixed in release 3.2.0. Thanks!