Specifies the storage type for string literals.
.-ro---. >>- -q--+-noro-+-----------------------------------------------><
See also #pragma options.
The default for all compiler invocations except cc and its derivatives is -qro. The default for the cc compiler invocation is -qnoro.
If -qro is specified, the compiler places string literals in read-only storage. If -qnoro is specified, string literals are placed in read/write storage.
You can also specify the storage type in your source program using:
#pragma strings storage_type
where storage_type is read-only or writable.
Placing string literals in read-only memory can improve runtime performance and save storage, but code that attempts to modify a read-only string literal may generate a memory error.
To compile myprogram.c so that the storage type is writable, enter:
xlc myprogram.c -qnoro
Related information