readOnly Code Generation Option

Syntax: Default:
gen(readOnly[, yes])
gen(readOnly, no)
gen(readOnly[, yes])

This option controls whether string literals are placed in read-only or read-write storage.

By default, string literals are placed in read-only storage.

If readOnly is set to no, string literals are placed in the default data section.

You can specify names of the the default constant segment and the default data segment with the gen(constSeg, name) and  gen(dataSeg, name) options, respectively.

You can also control how string literals are stored by using #pragma strings(readonly) or #pragma strings(writeable) in your source. The pragma overrides the configuration file option.



Incremental C++ Build
C Compilation
Configuration Files
Sections and Segments


Set Build Options
Build


Code Generation Options
Code Generation Options