I'm guessing he meant "int *k" rather than "&int k".
________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Paul Gilmartin <[email protected]> Sent: Sunday, March 26, 2023 5:49 PM To: [email protected] <[email protected]> Subject: Re: ASM call by value On Sun, 26 Mar 2023 19:35:59 -0400, Steve Smith wrote: >I forgot to mention, to pass by value with CALL, you need [a] register[s]. >e.g.: >void foo(int i, int j , &int k) > { > k = i + j; > } > That shouldn't be legal. In fact, gcc gives me: cc tinyc.c -o tinyc tinyc.c:3:25: error: expected parameter declarator void foo(int i, int j , &int k) -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
