Bug 2817 - tao_idl incorrectly passes defines params to preprocessor
Summary: tao_idl incorrectly passes defines params to preprocessor
Status: ASSIGNED
Alias: None
Product: TAO
Classification: Unclassified
Component: IDL Compiler (show other bugs)
Version: 1.5.6
Hardware: SPARC Solaris
: P3 minor
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks:
 
Reported: 2007-02-19 03:51 CST by Sam
Modified: 2018-01-15 11:21 CST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.