manpagez: man pages & more
info gcc
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.58.13 Function Specific Option Pragmas

#pragma GCC target ("string"...)

This pragma allows you to set target specific options for functions defined later in the source file. One or more strings can be specified. Each function that is defined after this point is as if attribute((target("STRING"))) was specified for that function. The parenthesis around the options is optional. See section Declaring Attributes of Functions, for more information about the target attribute and the attribute syntax.

The #pragma GCC target attribute is not implemented in GCC versions earlier than 4.4 for the i386/x86_64 and 4.6 for the PowerPC back ends. At present, it is not implemented for other back ends.

#pragma GCC optimize ("string"...)

This pragma allows you to set global optimization options for functions defined later in the source file. One or more strings can be specified. Each function that is defined after this point is as if attribute((optimize("STRING"))) was specified for that function. The parenthesis around the options is optional. See section Declaring Attributes of Functions, for more information about the optimize attribute and the attribute syntax.

The ‘#pragma GCC optimize’ pragma is not implemented in GCC versions earlier than 4.4.

#pragma GCC push_options
#pragma GCC pop_options

These pragmas maintain a stack of the current target and optimization options. It is intended for include files where you temporarily want to switch to using a different ‘#pragma GCC target’ or ‘#pragma GCC optimize’ and then to pop back to the previous options.

The ‘#pragma GCC push_options’ and ‘#pragma GCC pop_options’ pragmas are not implemented in GCC versions earlier than 4.4.

#pragma GCC reset_options

This pragma clears the current #pragma GCC target and #pragma GCC optimize to use the default switches as specified on the command line.

The ‘#pragma GCC reset_options’ pragma is not implemented in GCC versions earlier than 4.4.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October 19, 2013 using texi2html 5.0.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.