ROSTRING | NOROSTRING

Category

Object code control

Pragma equivalent

#pragma strings(readonly)

Purpose

Specifies the storage type for string literals.

When the ROSTRING compiler option is in effect, the compiler places string literals in read-only storage. Placing string literals in read-only memory can improve runtime performance and save storage.

When the NOROSTRING compiler option is in effect, string literals are placed in read/write storage.

Syntax

Read syntax diagramSkip visual syntax diagramRONORO

Defaults

ROSTRING

Usage

The usage status of this option is inserted in the object file to aid you in diagnosing a problem with your program.

IPA effects

If you specify the ROSTRING option during the IPA compile step, the information in the IPA object file reflects the state of each symbol.

If you specify the ROSTRING option on the IPA link step, it ignores the option. The reentrant or nonreentrant state of each symbol is maintained during IPA optimization and code generation.

The Partition Map section of the IPA link step listing and the object module do not display information about the ROSTRING option for that partition. The RENT, ROCONST, and ROSTRING options all contribute to the reentrant or nonreentrant state for each symbol. If any symbols within a partition are reentrant, the option section of the Partition Map displays the RENT compiler option.

Predefined macros

None.

Related information

For more information on related compiler options, see: