ARM® Compiler toolchain v4.1 for µVision Compiler Reference


List of Topics

Conventions and Feedback
Introduction
About the ARM compiler
Source language modes
ISO C90
ISO C99
ISO C++
Language extensions and language compliance
Language extensions
Language compliance
The C and C++ libraries
Compiler Command-line Options
Command-line options
-Aopt
--allow_null_this, --no_allow_null_this
--alternative_tokens, --no_alternative_tokens
--anachronisms, --no_anachronisms
--apcs=qualifer...qualifier
--arm
--arm_only
--asm
--asm_dir=directory_name
--autoinline, --no_autoinline
--bigend
--bitband
--brief_diagnostics, --no_brief_diagnostics
--bss_threshold=num
-c
-C
--c90
--c99
--code_gen, --no_code_gen
--compatible=name
--compile_all_input, --no_compile_all_input
--cpp
--cpu=list
--cpu=name
--create_pch=filename
-Dname[(parm-list)][=def]
--data_reorder, --no_data_reorder
--debug, --no_debug
--debug_macros, --no_debug_macros
--default_definition_visibility=visibility
--default_extension=ext
--dep_name, --no_dep_name
--depend=filename
--depend_dir=directory_name
--depend_format=string
--depend_single_line, --no_depend_single_line
--depend_system_headers, --no_depend_system_headers
--depend_target=target
--diag_error=tag[,tag,...]
--diag_remark=tag[,tag,... ]
--diag_style={arm|ide|gnu}
--diag_suppress=tag[,tag,...]
--diag_suppress=optimizations
--diag_warning=tag[,tag,...]
--diag_warning=optimizations
--dollar, --no_dollar
--dwarf2
--dwarf3
-E
--emit_frame_directives, --no_emit_frame_directives
--enum_is_int
--errors=filename
--exceptions, --no_exceptions
--exceptions_unwind, --no_exceptions_unwind
--export_all_vtbl, --no_export_all_vtbl
--export_defs_implicitly, --no_export_defs_implicitly
--extended_initializers, --no_extended_initializers
--feedback=filename
--force_new_nothrow, --no_force_new_nothrow
--forceinline
--fp16_format=format
--fpmode=model
--fpu=list
--fpu=name
--friend_injection, --no_friend_injection
-g
--global_reg=reg_name[,reg_name,...]
--guiding_decls, --no_guiding_decls
--help
--hide_all, --no_hide_all
-Idir[,dir,...]
--ignore_missing_headers
--implicit_include, --no_implicit_include
--implicit_include_searches, --no_implicit_include_searches
--implicit_key_function, --no_implicit_key_function
--implicit_typename, --no_implicit_typename
--import_all_vtbl
--info=totals
--inline, --no_inline
--interface_enums_are_32_bit
--interleave
-Jdir[,dir,...]
--kandr_include
-Lopt
--library_interface=lib
--library_type=lib
--link_all_input, --no_link_all_input
--list
--list_dir=directory_name
--list_macros
--littleend
--locale=lang_country
--long_long
--loose_implicit_cast
--lower_ropi, --no_lower_ropi
--lower_rwpi, --no_lower_rwpi
--ltcg
-M
--md
--message_locale=lang_country[.codepage]
--min_array_alignment=opt
--mm
--multibyte_chars, --no_multibyte_chars
--multifile, --no_multifile
--multiply_latency=cycles
--narrow_volatile_bitfields
--nonstd_qualifier_deduction, --no_nonstd_qualifier_deduction
-o filename
-Onum
--old_specializations, --no_old_specializations
--old_style_preprocessing
-Ospace
-Otime
--output_dir=directory_name
-P
--parse_templates, --no_parse_templates
--pch
--pch_dir=dir
--pch_messages, --no_pch_messages
--pch_verbose, --no_pch_verbose
--pending_instantiations=n
--phony_targets
--pointer_alignment=num
--preinclude=filename
--preprocess_assembly
--preprocessed
--reassociate_saturation, --no_reassociate_saturation
--reduce_paths, --no_reduce_paths
--relaxed_ref_def, --no_relaxed_ref_def
--remarks
--remove_unneeded_entities, --no_remove_unneeded_entities
--restrict, --no_restrict
--retain=option
--rtti, --no_rtti
--rtti_data, --no_rtti_data
-S
--show_cmdline
--signed_bitfields, --unsigned_bitfields
--signed_chars, --unsigned_chars
--split_ldm
--split_sections
--strict, --no_strict
--strict_warnings
--sys_include
--thumb
--trigraphs, --no_trigraphs
--type_traits_helpers, --no_type_traits_helpers
-Uname
--unaligned_access, --no_unaligned_access
--use_frame_pointer
--use_pch=filename
--using_std, --no_using_std
--version_number
--vfe, --no_vfe
--via=filename
--visibility_inlines_hidden
--vla, --no_vla
--vsn
-W
--wchar, --no_wchar
--wchar16
--wchar32
--whole_program
--wrap_diagnostics, --no_wrap_diagnostics
Language Extensions
Preprocessor extensions
#assert
#unassert
#warning
C99 language features available in C90
// comments
Subscripting struct
Flexible array members
C99 language features available in C++ and C90
Variadic macros
long long
restrict
Hexadecimal floats
Standard C language extensions
Constant expressions
Array and pointer extensions
Block scope function declarations
Dollar signs in identifiers
Top-level declarations
Benign redeclarations
External entities
Function prototypes
Standard C++ language extensions
? operator
Declaration of a class member
friend
Read/write constants
Scalar type constants
Specialization of nonmember function templates
Type conversions
Standard C and Standard C++ language extensions
Address of a register variable
Arguments to functions
Anonymous classes, structures and unions
Assembler labels
Empty declaration
Hexadecimal floating-point constants
Incomplete enums
Integral type extensions
Label definitions
Long float
Nonstatic local variables
Structure, union, enum, and bitfield extensions
Compiler-specific Features
Keywords and operators
__align
__alignof__
__ALIGNOF__
__asm
__forceinline
__global_reg
__inline
__int64
__INTADDR__
__irq
__packed
__pure
__smc
__softfp
__svc
__svc_indirect
__svc_indirect_r7
__value_in_regs
__weak
__writeonly
__declspec attributes
__declspec(dllexport)
__declspec(dllimport)
__declspec(noinline)
__declspec(noreturn)
__declspec(nothrow)
__declspec(notshared)
__declspec(thread)
Function attributes
__attribute__((alias)) function attribute
__attribute__((always_inline)) function attribute
__attribute__((const)) function attribute
__attribute__((constructor[(priority)])) function attribute
__attribute__((deprecated)) function attribute
__attribute__((destructor[(priority)])) function attribute
__attribute__((format_arg(string-index))) function attribute
__attribute__((malloc)) function attribute
__attribute__((noinline)) function attribute
__attribute__((nomerge)) function attribute
__attribute__((nonnull)) function attribute
__attribute__((noreturn)) function attribute
__attribute__((notailcall)) function attribute
__attribute__((pcs("calling_convention")))
__attribute__((pure)) function attribute
__attribute__((section("name"))) function attribute
__attribute__((unused)) function attribute
__attribute__((used)) function attribute
__attribute__((visibility("visibility_type"))) function attribute
__attribute__((weak)) function attribute
__attribute__((weakref("target"))) function attribute
Type attributes
__attribute__((bitband)) type attribute
__attribute__((aligned)) type attribute
__attribute((packed)) type attribute
Variable attributes
__attribute__((alias)) variable attribute
__attribute__((at(address))) variable attribute
__attribute__((aligned)) variable attribute
__attribute__((deprecated)) variable attribute
__attribute__((noinline)) constant variable attribute
__attribute__((packed)) variable attribute
__attribute__((section("name"))) variable attribute
__attribute__((unused)) variable attribute
__attribute__((used)) variable attribute
__attribute__((visibility("visibility_type"))) variable attribute
__attribute__((weak)) variable attribute
__attribute__((weakref("target"))) variable attribute
__attribute__((zero_init)) variable attribute
Pragmas
#pragma anon_unions, #pragma no_anon_unions
#pragma arm
#pragma arm section [section_type_list]
#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, ...]
#pragma exceptions_unwind, #pragma no_exceptions_unwind
#pragma hdrstop
#pragma import symbol_name
#pragma import(__use_full_stdio)
#pragma import(__use_smaller_memcpy)
#pragma inline, #pragma no_inline
#pragma no_pch
#pragma Onum
#pragma once
#pragma Ospace
#pragma Otime
#pragma pack(n)
#pragma pop
#pragma push
#pragma softfp_linkage, #pragma no_softfp_linkage
#pragma unroll [(n)]
#pragma unroll_completely
#pragma thumb
#pragma weak symbol, #pragma weak symbol1 = symbol2
Instruction intrinsics
__breakpoint intrinsic
__cdp intrinsic
__clrex intrinsic
__clz intrinsic
__current_pc intrinsic
__current_sp intrinsic
__disable_fiq intrinsic
__disable_irq intrinsic
__enable_fiq intrinsic
__enable_irq intrinsic
__fabs intrinsic
__fabsf intrinsic
__force_stores intrinsic
__ldrex intrinsic
__ldrexd intrinsic
__ldrt intrinsic
__memory_changed intrinsic
__nop
__pld intrinsic
__pldw intrinsic
__pli intrinsic
__promise intrinsic
__qadd intrinsic
__qdbl intrinsic
__qsub intrinsic
__rbit intrinsic
__rev intrinsic
__return_address intrinsic
__ror intrinsic
__schedule_barrier intrinsic
__semihost intrinsic
__sev intrinsic
__sqrt intrinsic
__sqrtf intrinsic
__ssat intrinsic
__strex intrinsic
__strexd intrinsic
__strt intrinsic
__swp intrinsic
__usat intrinsic
__wfe intrinsic
__wfi intrinsic
__yield intrinsic
ARMv6 SIMD intrinsics
See also
ETSI basic operations
Example
See also
C55x intrinsics
Example
See also
VFP status intrinsic
__vfp_status intrinsic
Fused Multiply Add (FMA) intrinsics
Named register variables
Syntax
Usage
Examples
See also
Compiler predefines
Predefined macros
Function names
C and C++ Implementation Details
C and C++ implementation details
Character sets and identifiers
Basic data types
Operations on basic data types
Structures, unions, enumerations, and bitfields
C++ implementation details
Using the ::operator new function
Tentative arrays
Old-style C parameters in C++ functions
Anachronisms
Template instantiation
Namespaces
C++ exception handling
Extern inline functions
ARMv6 SIMD Instruction Intrinsics
ARMv6 SIMD intrinsics by prefix
ARMv6 SIMD intrinsics, summary descriptions, byte lanes, affected flags
ARMv6 SIMD intrinsics, compatible processors and architectures
See also
ARMv6 SIMD instruction intrinsics and APSR GE flags
__qadd16 intrinsic
See also
__qadd8 intrinsic
See also
__qasx intrinsic
See also
__qsax intrinsic
See also
__qsub16 intrinsic
See also
__qsub8 intrinsic
See also
__sadd16 intrinsic
See also
__sadd8 intrinsic
See also
__sasx intrinsic
See also
__sel intrinsic
See also
__shadd16 intrinsic
See also
__shadd8 intrinsic
See also
__shasx intrinsic
See also
__shsax intrinsic
See also
__shsub16 intrinsic
See also
__shsub8 intrinsic
See also
__smlad intrinsic
See also
__smladx intrinsic
See also
__smlald intrinsic
See also
__smlaldx intrinsic
See also
__smlsd intrinsic
See also
__smlsdx intrinsic
See also
__smlsld intrinsic
See also
__smlsldx intrinsic
See also
__smuad intrinsic
See also
__smusd intrinsic
See also
__smusdx intrinsic
See also
__smuadx intrinsic
See also
__ssat16 intrinsic
See also
__ssax intrinsic
See also
__ssub16 intrinsic
See also
__ssub8 intrinsic
See also
__sxtab16 intrinsic
See also
__sxtb16 intrinsic
See also
__uadd16 intrinsic
See also
__uadd8 intrinsic
See also
__uasx intrinsic
See also
__uhadd16 intrinsic
See also
__uhadd8 intrinsic
See also
__uhasx intrinsic
See also
__uhsax intrinsic
See also
__uhsub16 intrinsic
See also
__uhsub8 intrinsic
See also
__uqadd16 intrinsic
See also
__uqadd8 intrinsic
See also
__uqasx intrinsic
See also
__uqsax intrinsic
See also
__uqsub16 intrinsic
See also
__uqsub8 intrinsic
See also
__usad8 intrinsic
See also
__usada8 intrinsic
See also
__usax intrinsic
See also
__usat16 intrinsic
See also
__usub16 intrinsic
See also
__usub8 intrinsic
See also
__uxtab16 intrinsic
See also
__uxtb16 intrinsic
See also
Via File Syntax
Overview of via files
Via file evaluation
Syntax
Summary Table of GNU Language Extensions
Standard C Implementation Definition
Implementation definition
Translation
Environment
Identifiers
Characters
Integers
Floating-point
Arrays and pointers
Registers
Structures, unions, enumerations, and bitfields
Qualifiers
Expression evaluation
Preprocessing directives
Library functions
Behaviors considered undefined by the ISO C Standard
Standard C++ Implementation Definition
Integral conversion
Calling a pure virtual function
Major features of language support
Standard C++ library implementation definition
C and C++ Compiler Implementation Limits
C++ ISO/IEC standard limits
Limits for integral numbers
Limits for floating-point numbers

List of Tables

1. Compiling with the --asm option
2. Compatible processor or architecture combinations
3. Compiling with the ---interleave option
4. Compiling with the -o option
5. Compiling without the -o option
6. Behavior of constant value initializers in comparison with ISO Standard C
7. Keyword extensions supported by the ARM compiler
8. __declspec attributes supported by the compiler and their equivalents
9. Function attributes supported by the compiler and their equivalents
10. Type attributes supported by the compiler and their equivalents
11. Variable attributes supported by the compiler and their equivalents
12. Pragmas supported by the compiler
13. Instruction intrinsics supported by the ARM compiler
14. Access widths supported by the __ldrex intrinsic
15. Access widths supported by the __ldrex intrinsic
16. Access widths supported by the __ldrt intrinsic
17. Access widths supported by the __strex intrinsic
18. Access widths supported by the __strexd intrinsic
19. Access widths supported by the __strt intrinsic
20. Access widths supported by the __swp intrinsic
21. ETSI basic operations supported by the ARM compilation tools
22. ETSI status flags exposed in the ARM compilation tools
23. TI C55x intrinsics supported by the compilation tools
24. Modifying the FPSCR flags
25. Named registers available on ARM architecture-based processors
26. Named registers available on targets with floating-point hardware
27. Predefined macros
28. Thumb architecture versions in relation to ARM architecture versions
29. Builtin variables
30. Character escape codes
31. Size and alignment of data types
32.
33.
34.
35.
36. Supported GNU extensions
37. Major feature support for language
38. Implementation limits
39. Integer ranges
40. Floating-point limits
41. Other floating-point characteristics

Proprietary Notice

Words and logos marked with  or  are registered trademarks or trademarks of ARM in the EU and other countries, except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the trademarks of their respective owners.

Neither the whole nor any part of the information contained in, or the product described in, this document may be adapted or reproduced in any material form except with the prior written permission of the copyright holder.

The product described in this document is subject to continuous developments and improvements. All particulars of the product and its use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded.

This document is intended only to assist the reader in the use of the product. ARM shall not be liable for any loss or damage arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product.

Where the term ARM is used it means “ARM or any of its subsidiaries as appropriate”.

Some material in this document is based on IEEE 754 - 1985 IEEE Standard for Binary Floating-Point Arithmetic. The IEEE disclaims any responsibility or liability resulting from the placement and use in the described manner.

Confidentiality Status

This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to.

Product Status

The information in this document is final, that is for a developed product.

Revision History
Revision AMay 2007Release for RVCT v3.1 for µVision
Revision BDecember 2008Release for RVCT v4.0 for µVision
Revision CJune 2011Release for ARM Compiler toolchain v4.1 for µVision
Copyright © 2007-2008, 2011 ARM. All rights reserved.ARM DUI 0376C
Non-ConfidentialID061811