### Pool Strings

The Pool Strings setting controls how the compiler stores string constants.

NOTE In principle, this setting works for all targets. However, it is useful only for a Table of Contents based linking mechanism such as that used for MacOS Classic on the PowerPC processor.

If you enable this setting, the compiler collects all string constants into a single data object so that your program needs only one TOC entry for all of them. While this decreases the number of TOC entries in your program, it also increases your program size because it uses a less efficient method to store the address of the string.

If you disable this setting, the compiler creates a unique data object and TOC entry for each string constant.

TIP You can change the size of the TOC with the Store Static Data in TOC setting in the PPC Processor panel.

NOTE This option can be overridden in PPC targets by using the Linker Pool Strings or Linker Merges String Constants options.

Enable this setting if your program is large and has many string constants.

NOTE If you enable the Pool Strings setting, the compiler ignores the PC-Relative Strings setting. This is a 68K-only feature.

The Pool Strings setting corresponds to the pragma pool_strings. To check this setting, use __option (pool_strings). By default, this setting is disabled.

See also “pool_strings” and Checking Settings.