3.13 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
9.73 #pragma anon_unions, #pragma no_anon_unions
9.74 #pragma arm
9.75 #pragma arm section [section_type_list]
9.76 #pragma diag_default tag[,tag,...]
9.77 #pragma diag_error tag[,tag,...]
9.78 #pragma diag_remark tag[,tag,...]
9.79 #pragma diag_suppress tag[,tag,...]
9.80 #pragma diag_warning tag[, tag, ...]
9.81 #pragma exceptions_unwind, #pragma no_exceptions_unwind
9.83 #pragma hdrstop
9.84 #pragma import symbol_name
9.85 #pragma import(__use_full_stdio)
9.86 #pragma import(__use_smaller_memcpy)
9.87 #pragma inline, #pragma no_inline
9.88 #pragma no_pch
9.89 #pragma Onum
9.90 #pragma once
9.91 #pragma Ospace
9.92 #pragma Otime
9.93 #pragma pack(n)
9.94 #pragma pop
9.95 #pragma push
9.96 #pragma softfp_linkage, #pragma no_softfp_linkage
9.97 #pragma thumb
9.98 #pragma unroll [(n)]
9.99 #pragma unroll_completely
9.100 #pragma weak symbol, #pragma weak symbol1 = symbol2
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.