Bug 2817

Summary: tao_idl incorrectly passes defines params to preprocessor
Product: TAO Reporter: Sam <janka.ace>
Component: IDL CompilerAssignee: DOC Center Support List (internal) <tao-support>
Status: ASSIGNED ---    
Severity: minor    
Priority: P3    
Version: 1.5.6   
Hardware: SPARC   
OS: Solaris   

Description Sam 2007-02-19 03:51:29 CST
tao_idl passes badly params that contain 2 (or more) escaped double quotation
marks \", it seems to all of them, except the first one of them and therefore
the C preprocessor fails and returns with error.

EXAMPLE (define VER has to be a string in the CODE):

tao_idl -Yp,cpp -DVER=\"1.1\" ../idl/omg/CosNotification.idl
cpp: 1.1: No such file or directory
cpp: warning: '-x c' after last input file has no effect
cpp: no input files
tao_idl: preprocessor "cpp" returned with an error

tao_idl -DVER=\"1.1\" ../idl/omg/CosNotification.idl
1.1:
command line: fatal: cannot open  1.1: No such file or directory
cc: acomp failed for 1
/tmp//tao-idli_zLaqFJ.cpp:
tao_idl: preprocessor "cc" returned with an error

IMHO, the quotations are lost somewhere in ACE_Process::spawn(). Another problem
is that i'm not sure tao_idl handles escaped quotations correctly, it just
doesn't takes care about such format values (as much as i can see from the code).
Comment 1 Jeff Parsons 2007-02-19 06:40:16 CST
I'll accept this one for now, although I've downgraded its severity to 'minor' 
since it seems to affect only one preprocessor.

We are considering the adoption of a dedicated preprocessor for the IDL 
compiler, rather than having it use the native one, which practice has led to 
many headaches in the past similar to this one.