Developer --> Technical Publications
PATH  Mac OS X Server Documentation > The GNU C Preprocessor

The GNU C Preprocessor

Previous | Contents | Next

Pragmas

The #pragma command is specified in the ANSI standard to have an arbitrary implementation-defined effect. For example, a #pragma might be used to indicate to the translator the best way to generate code, optimize, or diagnose errors. It may also pass information to the translator about the environment, or add debugging information.

The effect of anything specified in a #pragma is currently limited to the outermost declaration (that is, a function or a global data declaration).

The following pragmas are passed on by the C preprocessor to the compiler itself:

Pragma
Description

#pragma CC_OPT_ON

Force optimization on.

#pragma CC_OPT_OFF

Force optimization off.

#pragma CC_OPT_RESTORE

Restore optimization to what was specified on the command line (on if -O was specified, off if not).

#pragma CC_WRITABLE_STRINGS

Place strings in the data segment.

#pragma CC_NON_WRITABLE_STRINGS   

Place strings in the text segment.

All other #pragma commands are ignored by the C preprocessor.


The GNU C Preprocessor

Previous | Contents | Next