Next: , Previous: RS/6000 and PowerPC Pragmas, Up: Pragmas



5.49.3 Darwin Pragmas

The following pragmas are available for all architectures running the Darwin operating system. These are useful for compatibility with other Mac OS compilers.

mark tokens...
This pragma is accepted, but has no effect.
options align=alignment
This pragma sets the alignment of fields in structures. The values of alignment may be mac68k, to emulate m68k alignment, or power, to emulate PowerPC alignment. Uses of this pragma nest properly; to restore the previous setting, use reset for the alignment.
segment tokens...
This pragma is accepted, but has no effect.
unused (var [, var]...)
This pragma declares variables to be possibly unused. GCC will not produce warnings for the listed variables. The effect is similar to that of the unused attribute, except that this pragma may appear anywhere within the variables' scopes.
optimization_level { 0 | 1 | 2 | 3 | reset }
optimize_for_size { on | off | reset }
GCC optimization_level { 0 | 1 | 2 | 3 | reset }
GCC optimize_for_size { on | off | reset }
(These pragmas are APPLE ONLY.)

These pragmas set the current optimization level, similar but not identical to -O0 through -O3, or -Os, on the command line. These pragmas form a stack; the "reset" argument pops the stack, restoring the optimization level to what it was before the previous optimization pragma. The optimization level in effect at the beginning of each function definition is applied to that function. Currently, the pragmas will not affect optimizations whose implementation is based on whole-file analysis; this notably includes inlining and strict aliasing. Also, the feature currently doesn't apply to functions whose body is within a class definition (that is, such functions are compiled with the command line options).

The versions without "GCC" have the same syntax and similar effect as CodeWarrior pragmas (although since the optimizations performed by the compilers are not identical, the effect of the options won't be either). These may be convenient for existing code. The versions with "GCC" are recommended for new code.




Alojamiento con 500GB de espacio y 5000GB de ancho de banda por 4 euros al mes
Cómo contratar servicios de hosting con Dreamhost
Descuento, promocode para dreamhost de $50