[omniORB] omniidl c++ mapping

Christof Meerwald cmeerw@web.de
Thu, 23 Mar 2000 00:52:25 +0100


Hi David,

>> > As for the 'control reaches end of non-void
>> > function', there is a macro
>> > NEED_DUMMY_RETURN which ought to deal with that. 
>> > What platform and
>> > compiler are you using?
[...]
>Does anyone know whether this is needed for other versions of gcc on
>Solaris?
>
>Or is it needed for gcc on other platforms?

It seems that no dummy return is required if a "throw" is directly preceding
the end of function. But as the omniORB source sometimes uses the
OMNIORB_THROW macro which calls another function (omniExHelper::name) which
throws an exception, there is no way for the compiler to know that the
function doesn't return and it therefore complains about the missing
return/return value.

BTW, I get warnings ("control reaches end of non-void function") for lines
3930, 4234, 4342 in typecode.cc from my gcc 2.95.2/Linux - these are exactly
the functions which use the OMNIORB_THROW macro. Functions with a "throw"
and no return statement are ok (e.g. typecode.cc, line 860).


bye, Christof

-- 
http://cmeerw.cjb.net                     AIM, Yahoo! Messenger: cmeerw
mailto cmeerw at web.de

Don't hate yourself in the morning... sleep until noon!