- /* Convert the return value to the type of the function result */
- if (!HasVoidReturn (CurrentFunc)) {
- assignadjust (GetReturnType (CurrentFunc), &lval);
+ /* Ignore the return expression if the function returns void */
+ if (!F_HasVoidReturn (CurrentFunc)) {
+
+ /* Convert the return value to the type of the function result */
+ k = TypeConversion (&Expr, k, F_GetReturnType (CurrentFunc));
+
+ /* Load the value into the primary */
+ ExprLoad (CF_NONE, k, &Expr);