FW: [omniORB] Another bug in omniidl 4.1.3 cxx backend --> fixes

Will Denissen Will.Denissen at asml.com
Tue Nov 25 16:56:38 GMT 2008


Dear Duncan,
 
The following patches did fix the problem below.
 
#diff -r org/omniidl_be/cxx/header/defs.py omniidl_be/cxx/header/defs.py
946a947,948
>           fqname = id.Name(d.scopedName()).fullyQualify()
> 
950c952,953
<                            name = derivedName)
---
>                            name = derivedName,
>                            fqname = fqname)
956c959,960
<                            name = derivedName)
---
>                            name = derivedName,
>                            fqname = fqname)
 
#diff -r org/omniidl_be/cxx/header/template.py
omniidl_be/cxx/header/template.py
875,877c875,877
<   static inline @name at _slice* alloc() { return @name at _alloc(); }
<   static inline @name at _slice* dup(const @name at _slice* p) { return
@name at _dup(p); }
<   static inline void free(@name at _slice* p) { @name at _free(p); }
---
>   static inline @name at _slice* alloc() { return @fqname at _alloc(); }
>   static inline @name at _slice* dup(const @name at _slice* p) { return
@fqname at _dup(p); }
>   static inline void free(@name at _slice* p) { @fqname at _free(p); }

 
Could you please check whether this is a correct patch?
Although it fixes the problem, it is still not clear to me why the C++
compiler is 
complaining about ambiguities because the declarations were made in
different namespaces?
 
PS: the compiler I used was:
 
>c++ -v
Using built-in specs.
Target: sparc-sun-solaris2.8
Configured with: ../sources/gcc-4.1.2/configure --disable-nls
--prefix=/cadappl/gcc/4.1.2/gcc --enable-threads=posix
--disable-target-optspace --enable-languages=c,c++
Thread model: posix
gcc version 4.1.2
 
Best regard,
 
Will Denissen.
 
 



________________________________

	From: omniorb-list-bounces at omniorb-support.com
[mailto:omniorb-list-bounces at omniorb-support.com] On Behalf Of Will
Denissen
	Sent: Tuesday, November 25, 2008 15:53 PM
	To: omniorb-list at omniorb-support.com
	Subject: [omniORB] Another bug in omniidl 4.1.3 cxx backend
	
	
	
	Dear Duncan,
	 
	The following small idl file reveals a bug in omniidl 4.1.3 cxx
backend
	 
	------------------- bug2.idl  ---------------------------------
	module M1 {
	  struct S {
	    long  T;
	  };
	 
	  typedef ::M1::S  A[4];
	};
	 
	module M2 {
	  typedef ::M1::S  A[2];
	};
	------------------- end of bug2.idl ---------------------------
	 
	feeding the generated C++ code to the compiler gives:
	 
	bug2.hh: In static member function 'static M2::A_slice*
M2::A_copyHelper::dup(const M2::A_slice*)':
	bug2.hh:166: error: call of overloaded 'A_dup(const
M2::A_slice*&)' is ambiguous
	bug2.hh:136: note: candidates are: M2::A_slice* M2::A_dup(const
M2::A_slice*)
	bug2.hh:84: note:                 M1::A_slice* M1::A_dup(const
M1::A_slice*)
	bug2.hh: In static member function 'static void
M2::A_copyHelper::free(M2::A_slice*)':
	bug2.hh:167: error: call of overloaded 'A_free(M2::A_slice*&)'
is ambiguous
	bug2.hh:159: note: candidates are: void M2::A_free(M2::A_slice*)
	bug2.hh:107: note:                 void M1::A_free(M1::A_slice*)
	
	
	
	 
	Best regards,
	 
	Will Denissen




-- 
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited.  Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities.  To the extent you are relying on this information, you are doing so at your own risk.   If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20081125/78f0016a/attachment.htm


More information about the omniORB-list mailing list