You should be able to specify the attribute that turns off ARMODE for a given function. Here is the relevant text in the Metal C Programming Guide that describes it:
To override the effect of the ARMODE option and selectively re-set particular
functions to be in non-AR mode (or primary address space control mode), use
__attribute__((noarmode)). For more information on this attribute, see armode |
noarmode type attribute (C only) and z/OS Metal C Programming Guide and
Reference.
When NOARMODE is in effect, functions are not in AR mode unless
__attribute__((armode)) is specifically specified for the functions.
----------------------------------------------
Answered by dinoxlc on Oct. 30, 2018
----------------------------------------------
Original Message:
Sent: Thu May 21, 2020 02:49 AM
From: FANG LU
Subject: Metal C ARMODE compiler option
Metal C ARMODE compiler option is generating code that stays in ARMODE when calling external functions that are not ARMODE. That makes the option useless to me unless there is a way around this. I cannot change the headers in the external functions to specify NOARMODE. Without the ARMODE option I cannot detect at compile time if it is ARMODE in my epilog and prolog code using the global symbol &CCN_ASCM.
------------------------------
javapaul
------------------------------