[omniORB] Re: problem compiling omniORB 3 on IRIX
James Riden
jamesr@harlequin.co.uk
Wed, 20 Oct 1999 17:48:40 +0100
At 18:10 20/10/99 +0100, David Riddoch wrote:
>On Wed, 20 Oct 1999, James Riden wrote:
>
>> I'm experiencing a problem with the MIPSpro 7.2.1 compiler on
>> IRIX 6.5 It seems to need fully (or more fully) qualified
>> names when invoking superclass constructors in an initializer
>> list.
[I'd like to make it clear at this point that I don't think this is
a problem at the omniORB end, btw. I think the behaviour of the 7.2
compiler is not what the standard requires.]
>> For instance, the following piece of code from include/omniORB3/
>> userexception.h :
>>
>> >#define OMNIORB_DECLARE_USER_EXCEPTION(name, attr) \
>> > \
>> >class name : public CORBA::UserException { \
>> >public: \
>> > inline name() { \
>> > pd_insertToAnyFn = insertToAnyFn; \
>> > pd_insertToAnyFnNCP = insertToAnyFnNCP; \
>> > } \
>> > inline name(const name& _ex) : CORBA::UserException(_ex) {} \
>> ^^^^^^^
>> inserted by me
>
>The problem is I think MSVC will get upset if we do it that way. And I
>would have though that this ought to cause problems elsewhere in the code.
>Let me know if you see other problems.
Sorry, yes. I was just giving an example, not suggesting you change the code
as above - it would almost certainly break MSVC, and it is a problem
elsewhere.
In some other code, I've had to introduce a macro that looks like :
#ifndef __sgi
#define SUPER_CLASS_CTOR(a,b) b
#else
#define SUPER_CLASS_CTOR(a,b) a##::##b
#endif
then I'd use :
inline name(const name& _ex) : SUPER_CLASS_CTOR(CORBA,UserException)(_ex).
I appreciate this is an evil hack to support a (probably) non-standard
compiler
and you won't want it in your code ;) But I'll do it anyway and let you know
how it goes.
Can someone out there try it with the MIPSpro 7.3 compiler please ?
cheers,
James