Pragmas (Using the GNU Compiler Collection (GCC))

### 6.5 Pragmas Accepted by GCC ¶

GCC supports several types of pragmas, primarily in order to compile code originally written for other compilers. Note that in general we do not recommend the use of pragmas; attributes (see Attributes Specific to GCC) are usually a better and more portable solution.

The GNU C preprocessor recognizes several pragmas in addition to the compiler pragmas documented here. Refer to the CPP manual for more information.

GCC additionally recognizes OpenMP pragmas when the `-fopenmp` option is specified, and OpenACC pragmas when the `-fopenacc` option is specified. See OpenMP, and OpenACC.