fixes for cpp, checking of return type modfiers, generation on c/jl wrappers