[omniORB] gcc 3.0 with omniORB

Sai-Lai Lo s.lo@uk.research.att.com
Wed, 27 Jun 2001 09:34:47 -0000


Please get 3.0.4. In addition to the change you mentioned (we use __GNUG__
>= 3), there is also a small change to omniNames fstream code.

Sai-Lai


----- Original Message -----
From: "Leandro Fanzone" <leandro@hasar.com>
To: "Sai-Lai Lo" <s.lo@uk.research.att.com>
Cc: "omniorb list" <omniorb-list@uk.research.att.com>
Sent: Tuesday, June 26, 2001 7:02 PM
Subject: Re: [omniORB] gcc 3.0 with omniORB


> Compiling omniORB 3.0.3 with gcc 3.0, I had a small problem: namespaces
seem not
> to be defined. I have found at CORBA_sysdep.h:237 the following lines:
>
> #if __GNUC_MINOR__ >= 91 || __GNUC_MINOR__ == 9
> #define HAS_Cplusplus_Namespace
> #define HAS_Cplusplus_Bool
> #endif
>
> This leaves out the new __GNUC_MINOR__ (0) and therefore _CORBA_MODULE
ends up
> as class instead of namespace.
>
> Please confirm whether I am right, and if I have to append "|| __GNUG__ >
2" to
> condition mentioned.
> Thank you in advance,
>
> Leandro Fanzone
> Compañía HASAR
> Buenos Aires
> Argentina
>
> Sai-Lai Lo wrote:
>
> > In case you can't wait to use gcc 3.0 to compile omniORB, the following
note
> > may save you hours of time debugging.
> >
> > Essentially, the compiler generates wrong code for the ctor of a rather
> > complex multiplely inherited class. When the ctor is run, the program
SEGV.
> > The 'rather complex multiplely inherited class' unfortunately is the POA
> > skeleton of a multiplely inherited interface:
> >
> > interface Echo {
> > };
> >
> > interface DerivedEcho : Echo {
> > };
> >
> > interface MoreEcho {
> > };
> >
> > interface MultiEcho : DerivedEcho, MoreEcho {
> > };
> >
> > Simple single inheritance seems to work. If you have to use multiple
> > inheritance in your IDL, you've been warned.
> >
> > omniORB 3.0 can be compiled with gcc 3.0. The only change necessary is
in
> > $(top)/src/appl/omniNames/log.cc:
> >
> > #if defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x500
> > #define USE_STREAM_OPEN
> > #define OPEN(name,mode,perm) open(name,mode,perm)
> > #elif defined(__KCC)
> > #define USE_STREAM_OPEN
> > #define OPEN(name,mode,perm) open(name,mode)
> > #elif defined(__GNUG__) && __GNUG__ >= 3              <---
> > #define USE_STREAM_OPEN                               <---
> > #define OPEN(name,mode,perm) open(name,mode)          <---
> > #endif
> >
> > Sai-Lai
> >
> > PS. If you are interested in knowing a test case to reproduce the gcc
bug,
> > see the attached file.
> >
>
  ------------------------------------------------------------------------
> >            Name: t.cc
> >    t.cc    Type: unspecified type (application/octet-stream)
> >        Encoding: quoted-printable
>