> yes but this is why I ask....it's a c snippet which I would like to port to c++
Actually, no it isn't.
It's just as invalid in C as it is in C++.
Just because your broken compiler happens to compile it doesn't change that.
Fix the return types and move on.