4.15 Pragmas recognized by the compiler

The compiler recognizes a number of pragmas, used to instruct the compiler to use particular features.

The compiler recognizes the following pragmas:

Pragmas for saving and restoring the pragma state

  • #pragma pop
  • #pragma push

Pragmas controlling optimization goals

  • #pragma Onum
  • #pragma Ospace
  • #pragma Otime

Pragmas controlling code generation

  • #pragma arm
  • #pragma thumb
  • #pragma exceptions_unwind, #pragma no_exceptions_unwind

Pragmas controlling loop unrolling

  • #pragma unroll [(n)]
  • #pragma unroll_completely

Pragmas controlling Precompiled Header (PCH) processing

  • #pragma hdrstop
  • #pragma no_pch

Pragmas controlling anonymous structures and unions

  • #pragma anon_unions, #pragma no_anon_unions

Pragmas controlling diagnostic messages

  • #pragma diag_default tag[,tag,...]
  • #pragma diag_error tag[,tag,...]
  • #pragma diag_remark tag[,tag,...]
  • #pragma diag_suppress tag[,tag,...]
  • #pragma diag_warning tag[, tag, ...]

Miscellaneous pragmas

  • #pragma arm section [section_type_list]
  • #pragma import(__use_full_stdio)
  • #pragma inline, #pragma no_inline
  • #pragma once
  • #pragma pack(n)
  • #pragma softfp_linkage, #pragma no_softfp_linkage
  • #pragma import symbol_name
Related reference
10.75 #pragma anon_unions, #pragma no_anon_unions
10.76 #pragma arm
10.77 #pragma arm section [section_type_list]
10.78 #pragma diag_default tag[,tag,...]
10.79 #pragma diag_error tag[,tag,...]
10.80 #pragma diag_remark tag[,tag,...]
10.81 #pragma diag_suppress tag[,tag,...]
10.82 #pragma diag_warning tag[, tag, ...]
10.83 #pragma exceptions_unwind, #pragma no_exceptions_unwind
10.84 #pragma GCC system_header
10.85 #pragma hdrstop
10.86 #pragma import symbol_name
10.87 #pragma import(__use_full_stdio)
10.88 #pragma import(__use_smaller_memcpy)
10.89 #pragma inline, #pragma no_inline
10.90 #pragma no_pch
10.91 #pragma Onum
10.92 #pragma once
10.93 #pragma Ospace
10.94 #pragma Otime
10.95 #pragma pack(n)
10.96 #pragma pop
10.97 #pragma push
10.98 #pragma softfp_linkage, #pragma no_softfp_linkage
10.99 #pragma thumb
10.100 #pragma unroll [(n)]
10.101 #pragma unroll_completely
10.102 #pragma weak symbol, #pragma weak symbol1 = symbol2
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.