VarArgs Macros [message #379879] |
Thu, 08 January 2009 04:16 |
donato
Messages: 53 Registered: November 2007 Location: Barcelona, Spain
|
Member |
|
|
Hi people!
I'm trying to use varargs macros to re-define printf.
Seing HP's docs, i can use to ways:
#define foo(f, s...) printf(f , ## s)
#define foo(f, ...) printf (f, __VA_ARGS__)
Both works fine when I compile C programs (HP's aCC cmopiler).
But when I use those macros in Pro*C programs, I obtain:
Error de sintaxis en la línea 28, columna 22, archivo .../header.h:
Error en la línea 28, columna 22 del archivo .../header.h
#define foo(f, s...) printf(f , ## s)
................1
PCC-S-02014, Se ha encontrado el símbolo "..." cuando se esperaba uno de los siguientes.
I'm compiling with this options:
MODE=ANSI CLOSE_ON_COMMIT=NO DYNAMIC=ANSI CODE=ANSI_C SQLCHECK=FULL USERID=USER/PASS@DB
Can anybody help me, please?
Thanks in advance!
|
|
|
|
|
|