[omniORB] BUG: macro expansion problem

Alex Hornby alex@anvil.co.uk
Fri, 7 May 1999 14:33:26 +0100 (BST)


David Riddoch writes:
 > On Fri, 7 May 1999, Alex Hornby wrote:
 > 
 > > Dear all,
 > > 
 > > Macro expansion is not being done properly, as the ## is left in.
 > > I know macros are nasty, but one of our developers is very attached to 
 > > them.
 > > 
 > > Here is an example running on omniORB 2.7.1 on solaris 2.6 Sun PRO 4.2.
 > > I have also attached the C++ preprocessor's output for comparison.
 > 
 > omniidl2 uses your C compiler's preprocessor - so if the ## is not being
 > expanded the problem probably lies with you C preprocessor.
 > 
 > What do you get if you use cc -E ?
 > 
 > 
 > David
 > 

This doesn't appear to be the problem.

-- Output cc -E 
#pragma	prefix "anvil.co.uk"
# 2 "macro_probem.idl"

# 8

module example {
     struct evtag_short { short value ; string errortext ; };
     struct evtag_string { string value ; string errortext ; };
     struct evtag_long { long value ; string errortext ; };
     struct evtag_float { float value ; string errortext ; };
     struct evtag_double { double value ; string errortext ; };
     struct evtag_Date { Date value ; string errortext ; };
     struct evtag_DateTime { DateTime value ; string errortext ; };
     struct evtag_Currency { Currency value ; string errortext ; };
     struct evtag_Instrument { Instrument value ; string errortext ; };
     struct evtag_Agency { Agency value ; string errortext ; };
     struct evtag_Counterparty { Counterparty value ; string errortext ; };
     struct evtag_Book { Book value ; string errortext ; };
};
#ident "acomp: WorkShop Compilers 4.2 30 Oct 1996 C 4.2"