View Single Post

   
  #5 (permalink)  
Old 03-17-2008, 06:04 AM
Dennis Handly
 
Posts: n/a
Default Re: Absent of return in old C++ codes

Syncnister wrote:
> I have found some old C++ code with function defined as returning
> boolean. The thing is that doesn't have any return statement at the
> end. Looking at how the function is being used, suggesting that it is
> expected to return true by default.


No, it will return whatever is in the return register, R8 for IPF and
R28 for PA.

> I suspect that in HP-UX I'm getting return value true as default


This is all random as mentioned. It depends on opt level, etc.
Reply With Quote