Am 24.08.2012 15:11, schrieb Paul Gilmartin:
Otherwise (NOROCONST) it is ignored.
This is the default with C (not with C++).

I suspect const is not entirely ignored.  Won't the compiler warn you
if you modify, or even threaten to modify, a const object?  But is it
moved to WSA even if it's declared static const?  There would seem
to be no reason for that.

If I read the books correctly, if the options RENT and NOROCONST
are in effect, then yes, the arrays are moved to the WSA even if const is specified.

From the description of #pragma variable in the z/OS 1.10 XL C/C++ Language Reference,
section 18.5.46:

C only.  To specify that variables declared as const not be placed into
the writeable static area, *you must use the ROCONST and RENT compiler
options.
*
Kind regards

Bernd*

*

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to