Avoid generating a return statement for void as last expression