Home » Developer & Programmer » Precompilers, OCI & OCCI » VarArgs Macros (Oracle 10.2.0 in HP-UX B.11.23 U ia64)
VarArgs Macros [message #379879] Thu, 08 January 2009 04:16 Go to next message
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!
Re: VarArgs Macros [message #380175 is a reply to message #379879] Fri, 09 January 2009 07:05 Go to previous messageGo to next message
vicenzo
Messages: 28
Registered: December 2007
Location: Paris
Junior Member
Hi,

PRO*C has nearly no support for C99 and most of the features introduced in C99 are not supported (like variadic macros)...

[Updated on: Fri, 09 January 2009 07:07]

Report message to a moderator

Re: VarArgs Macros [message #380189 is a reply to message #380175] Fri, 09 January 2009 07:56 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
If I were you, I would log an enhancement request on Metalink for C99 support.
Re: VarArgs Macros [message #380190 is a reply to message #379879] Fri, 09 January 2009 07:58 Go to previous message
donato
Messages: 53
Registered: November 2007
Location: Barcelona, Spain
Member
Oki Doki!

Thanks so much!!!!!
Previous Topic: PCC-S-02014 error while compiling with in Sun Solaris
Next Topic: Advice needed for performance improvement in OCI program
Goto Forum:
  


Current Time: Sat Dec 03 17:54:28 CST 2016

Total time taken to generate the page: 0.08096 seconds