[omniORB] Bug in omniORB 2.71? consts and MSVC 6.0

David Riddoch djr@uk.research.att.com
Wed, 5 May 1999 09:22:42 +0100 (GMT)


Hi Bill,


Thanks for reporting this. I think it was first spotted by Andrew
Stitcher. Just remove the "|| _MSC_VER > 1199" from each of these 
macros.


Cheers,
David


On Thu, 22 Apr 1999, Bill Lowrey wrote:

> I believe I have found a bug in omniORB 2.71relating to the handling of
> consts inside class scope.
> 
> Example code:
> /// foo.idl ///
> 
> interface Foo {
>     const short useLatestVersion = -1;
> ];
> 
> The idl compiler works fine, but the SK file will not compile.
> The problem is the definition of the following macros in CORBA_sysdep.h
> starting at Line 445. The obvious assumption was that the bug would be fixed
> in 6.0. I don't believe it is. 6.0 defines _MSC_VER to be 1200.
> #ifndef _init_in_cldecl_
> #  if !defined(_MSC_VER) || _MSC_VER > 1199
> #    define _init_in_cldecl_(x) x
> #  else
> #    define _init_in_cldecl_(x)
> #  endif
> #else
> #error "Name conflict: _init_in_cldecl_ is already defined."
> #endif
> 
> #ifndef _init_in_cldef_
> #  if !defined(_MSC_VER) || _MSC_VER > 1199
> #    define _init_in_cldef_(x)
> #  else
> #    define _init_in_cldef_(x) x
> #  endif
> #else
> #error "Name conflict: _init_in_cldef_ is already defined."
> #endif
> 
> If you use the following, the code compiles as it should.
> 
> #ifndef _init_in_cldecl_
> #  if !defined(_MSC_VER) || _MSC_VER > 1299
> #    define _init_in_cldecl_(x) x
> #  else
> #    define _init_in_cldecl_(x)
> #  endif
> #else
> #error "Name conflict: _init_in_cldecl_ is already defined."
> #endif
> 
> #ifndef _init_in_cldef_
> #  if !defined(_MSC_VER) || _MSC_VER > 1299
> #    define _init_in_cldef_(x)
> #  else
> #    define _init_in_cldef_(x) x
> #  endif
> #else
> #error "Name conflict: _init_in_cldef_ is already defined."
> #endif
> 
> Regards,
> 
> Bill Lowrey
> 
> billl@forelogic.com
> 
>