Keil Logo

ARM Compiler armclang Reference Guide

ARM® Compiler armclang Reference Guide

Version 6.7


Table of Contents

Preface
About this book
Using this book
Glossary
Typographic conventions
Feedback
Other information
1 armclang Command-line Options
1.1 Support level definitions
1.2 Summary of armclang command-line options
1.3 -c
1.4 -D
1.5 -E
1.6 -e
1.7 -fbare-metal-pie
1.8 -fcommon, -fno-common
1.9 -fdata-sections, -fno-data-sections
1.10 -ffast-math, -fno-fast-math
1.11 -ffp-mode
1.12 -ffunction-sections, -fno-function-sections
1.13 @file
1.14 -fldm-stm, -fno-ldm-stm
1.15 -fno-inline-functions
1.16 -flto
1.17 -fexceptions, -fno-exceptions
1.18 -fomit-frame-pointer, -fno-omit-frame-pointer
1.19 -fropi, -fno-ropi
1.20 -fropi-lowering, -fno-ropi-lowering
1.21 -frwpi, -fno-rwpi
1.22 -frwpi-lowering, -fno-rwpi-lowering
1.23 -fshort-enums, -fno-short-enums
1.24 -fshort-wchar, -fno-short-wchar
1.25 -fstrict-aliasing, -fno-strict-aliasing
1.26 -fvectorize, -fno-vectorize
1.27 -ftrapv
1.28 -fwrapv
1.29 -g, -gdwarf-2, -gdwarf-3, -gdwarf-4
1.30 -I
1.31 -include
1.32 -L
1.33 -l
1.34 -M, -MM
1.35 -MD, -MMD
1.36 -MF
1.37 -MG
1.38 -MP
1.39 -MT
1.40 -march
1.41 -marm
1.42 -mbig-endian
1.43 -mcmse
1.44 -mcpu
1.45 -mexecute-only
1.46 -mfloat-abi
1.47 -mfpu
1.48 -mimplicit-it
1.49 -mlittle-endian
1.50 -munaligned-access, -mno-unaligned-access
1.51 -mthumb
1.52 -o
1.53 -O
1.54 -S
1.55 -save-temps
1.56 -std
1.57 --target
1.58 -U
1.59 -u
1.60 -v
1.61 --version
1.62 --version_number
1.63 --vsn
1.64 -W
1.65 -Wl
1.66 -Xlinker
1.67 -x
1.68 -###
2 Compiler-specific Keywords and Operators
2.1 Compiler-specific keywords and operators
2.2 __alignof__
2.3 __asm
2.4 __declspec attributes
2.5 __declspec(noinline)
2.6 __declspec(noreturn)
2.7 __declspec(nothrow)
2.8 __inline
3 Compiler-specific Function, Variable, and Type Attributes
3.1 Function attributes
3.2 __attribute__((always_inline)) function attribute
3.3 __attribute__((cmse_nonsecure_call)) function attribute
3.4 __attribute__((cmse_nonsecure_entry)) function attribute
3.5 __attribute__((const)) function attribute
3.6 __attribute__((constructor[(priority)])) function attribute
3.7 __attribute__((format_arg(string-index))) function attribute
3.8 __attribute__((interrupt("type"))) function attribute
3.9 __attribute__((malloc)) function attribute
3.10 __attribute__((naked)) function attribute
3.11 __attribute__((noinline)) function attribute
3.12 __attribute__((nonnull)) function attribute
3.13 __attribute__((noreturn)) function attribute
3.14 __attribute__((nothrow)) function attribute
3.15 __attribute__((pcs("calling_convention"))) function attribute
3.16 __attribute__((pure)) function attribute
3.17 __attribute__((section("name"))) function attribute
3.18 __attribute__((used)) function attribute
3.19 __attribute__((unused)) function attribute
3.20 __attribute__((value_in_regs)) function attribute
3.21 __attribute__((visibility("visibility_type"))) function attribute
3.22 __attribute__((weak)) function attribute
3.23 __attribute__((weakref("target"))) function attribute
3.24 Type attributes
3.25 __attribute__((aligned)) type attribute
3.26 __attribute__((packed)) type attribute
3.27 __attribute__((transparent_union)) type attribute
3.28 Variable attributes
3.29 __attribute__((alias)) variable attribute
3.30 __attribute__((aligned)) variable attribute
3.31 __attribute__((deprecated)) variable attribute
3.32 __attribute__((packed)) variable attribute
3.33 __attribute__((section("name"))) variable attribute
3.34 __attribute__((used)) variable attribute
3.35 __attribute__((unused)) variable attribute
3.36 __attribute__((weak)) variable attribute
3.37 __attribute__((weakref("target"))) variable attribute
4 Compiler-specific Intrinsics
4.1 __breakpoint intrinsic
4.2 __current_pc intrinsic
4.3 __current_sp intrinsic
4.4 __disable_fiq intrinsic
4.5 __disable_irq intrinsic
4.6 __enable_fiq intrinsic
4.7 __enable_irq intrinsic
4.8 __force_stores intrinsic
4.9 __memory_changed intrinsic
4.10 __schedule_barrier intrinsic
4.11 __semihost intrinsic
4.12 __vfp_status intrinsic
5 Compiler-specific Pragmas
5.1 #pragma clang system_header
5.2 #pragma clang diagnostic
5.3 #pragma once
5.4 #pragma pack(...)
5.5 #pragma unroll[(n)], #pragma unroll_completely
5.6 #pragma weak symbol, #pragma weak symbol1 = symbol2
6 Other Compiler-specific Features
6.1 ACLE support
6.2 Predefined macros
6.3 Inline functions
6.4 Half-precision floating-point number format
6.5 TT instruction intrinsics
6.6 Non-secure function pointer intrinsics

Release Information

Document History
Issue Date Confidentiality Change
A 14 March 2014 Non-Confidential ARM Compiler v6.00 Release
B 15 December 2014 Non-Confidential ARM Compiler v6.01 Release
C 30 June 2015 Non-Confidential ARM Compiler v6.02 Release
D 18 November 2015 Non-Confidential ARM Compiler v6.3 Release
E 24 February 2016 Non-Confidential ARM Compiler v6.4 Release
F 29 June 2016 Non-Confidential ARM Compiler v6.5 Release
G 04 November 2016 Non-Confidential ARM Compiler v6.6 Release
0607-00 05 April 2017 Non-Confidential ARM Compiler v6.7 Release. Document numbering scheme has changed.

Non-Confidential Proprietary Notice

This document is protected by copyright and other related rights and the practice or implementation of the information contained in this document may be protected by one or more patents or pending patent applications. No part of this document may be reproduced in any form by any means without the express prior written permission of ARM. No license, express or implied, by estoppel or otherwise to any intellectual property rights is granted by this document unless specifically stated.

Your access to the information in this document is conditional upon your acceptance that you will not use or permit others to use the information for the purposes of determining whether implementations infringe any third party patents.

THIS DOCUMENT IS PROVIDED “AS IS”. ARM PROVIDES NO REPRESENTATIONS AND NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE DOCUMENT. For the avoidance of doubt, ARM makes no representation with respect to, and has undertaken no analysis to identify or understand the scope and content of, third party patents, copyrights, trade secrets, or other rights.

This document may include technical inaccuracies or typographical errors.

TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT, EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

This document consists solely of commercial items. You shall be responsible for ensuring that any use, duplication or disclosure of this document complies fully with any relevant export laws and regulations to assure that this document or any portion thereof is not exported, directly or indirectly, in violation of such export laws. Use of the word “partner” in reference to ARM’s customers is not intended to create or refer to any partnership relationship with any other company. ARM may make changes to this document at any time and without notice.

If any of the provisions contained in these terms conflict with any of the provisions of any signed written agreement covering this document with ARM, then the signed written agreement prevails over and supersedes the conflicting provisions of these terms. This document may be translated into other languages for convenience, and you agree that if there is any conflict between the English version of this document and any translation, the terms of the English version of the Agreement shall prevail.

Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM Limited or its affiliates in the EU and/or elsewhere. All rights reserved. Other brands and names mentioned in this document may be the trademarks of their respective owners. Please follow ARM’s trademark usage guidelines at http://www.arm.com/about/trademark-usage-guidelines.php

Copyright © 2014–2017, ARM Limited or its affiliates. All rights reserved.

ARM Limited. Company 02557590 registered in England.

110 Fulbourn Road, Cambridge, England CB1 9NJ.

LES-PRE-20349

Additional Notices

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.

Unrestricted Access is an ARM internal classification.

Product Status

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

Web Address

Non-ConfidentialPDF file icon PDF versionARM 100067_0607_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.