gcc: Function Specific Option Pragmas
1
1 6.61.15 Function Specific Option Pragmas
1 ----------------------------------------
1
1 '#pragma GCC target ("STRING"...)'
1
1 This pragma allows you to set target specific options for functions
1 defined later in the source file. One or more strings can be
1 specified. Each function that is defined after this point is as if
1 'attribute((target("STRING")))' was specified for that function.
11 The parenthesis around the options is optional. ⇒Function
Attributes, for more information about the 'target' attribute and
1 the attribute syntax.
1
1 The '#pragma GCC target' pragma is presently implemented for x86,
1 ARM, AArch64, PowerPC, S/390, and Nios II targets only.
1
1 '#pragma GCC optimize ("STRING"...)'
1
1 This pragma allows you to set global optimization options for
1 functions defined later in the source file. One or more strings
1 can be specified. Each function that is defined after this point
1 is as if 'attribute((optimize("STRING")))' was specified for that
11 function. The parenthesis around the options is optional. ⇒
Function Attributes, for more information about the 'optimize'
1 attribute and the attribute syntax.
1
1 '#pragma GCC push_options'
1 '#pragma GCC pop_options'
1
1 These pragmas maintain a stack of the current target and
1 optimization options. It is intended for include files where you
1 temporarily want to switch to using a different '#pragma GCC
1 target' or '#pragma GCC optimize' and then to pop back to the
1 previous options.
1
1 '#pragma GCC reset_options'
1
1 This pragma clears the current '#pragma GCC target' and '#pragma
1 GCC optimize' to use the default switches as specified on the
1 command line.
1