2.3 Default differences

Some compiler and assembler options are different between Arm® Compiler 5 and Arm Compiler 6, or have different default values.

The following table lists these differences.

Table 2-2 Differences in defaults

Arm Compiler 5 Arm Compiler 6 Notes Further information
‑‑apcs=/hardfp or ‑‑apcs=/softfp ‑mfloat‑abi=softfp

The default floating-point linkage in Arm Compiler 5 depends on the specified processor. If the processor has floating-point hardware, then Arm Compiler 5 uses hardware floating-point linkage. If the processor does not have floating-point hardware, then Arm Compiler 5 uses software floating-point linkage. In Arm Compiler 6, the default is always software floating-point linkage for AArch32 state.

The ‑mfloat‑abi option also controls the type of floating-point instructions that the compiler uses. ‑mfloat‑abi=softfp uses hardware floating-point instructions. Use ‑mfloat‑abi=soft to use software floating-point linkage and software library functions for floating-point operations.

‑‑apcs for Arm® Compiler 5.

‑mfloat‑abi for Arm® Compiler 6.

__image.axf a.out Default name for the executable image if none of ‑o, ‑c, ‑E, or ‑S are specified on the command-line.

‑o for Arm® Compiler 5.

‑o for Arm® Compiler 6.

‑‑enum_is_int is disabled by default ‑fno‑short‑enums ‑‑enum_is_int is disabled by default in Arm Compiler 5, so the smallest data type that can hold the enumerator values is used. ‑fno‑short‑enums is the default in Arm Compiler 6, so the size of the enumeration type is at least 32 bits.

‑‑enum_is_int for Arm® Compiler 5.

‑fno‑short‑enums for Arm® Compiler 6.

‑O2 ‑O0 Arm Compiler 5 uses high optimization (-O2) by default. Arm Compiler 6 uses minimum optimization (-O0) by default.

‑O for Arm® Compiler 5.

‑O for Arm® Compiler 6.

Optimization differences.

C++03 C++98 In Arm Compiler 5, the default C++ source language mode is C++03. In Arm Compiler 6, the default source language mode is C++98. You can override the default source language with ‑std in Arm Compiler 6.

‑‑cpp for Arm® Compiler 5.

‑std for Arm® Compiler 6.

C90 C11 In Arm Compiler 5, the default C source language mode C90. In Arm Compiler 6, the default C source language mode C11. You can override the default source language with ‑std in Arm Compiler 6.

‑‑c90 for Arm® Compiler 5.

‑std for Arm® Compiler 6.

‑‑no_exceptions ‑fexceptions or ‑fno‑exceptions In Arm Compiler 5, C++ exceptions are disabled by default (--no_exceptions). In Arm Compiler 6, C++ exceptions are enabled by default (-fexceptions) for C++ sources, or disabled by default (-fno-exceptions) for C sources.

‑‑no_exceptions for Arm® Compiler 5.

‑fexceptions for Arm® Compiler 6.

‑‑wchar16 ‑fno‑short‑wchar In Arm Compiler 5, the size of wchar_t is 2 bytes by default (--wchar16). In Arm Compiler 6, the size of wchar_t is 4 bytes by default (-fno-short-wchar).

‑‑wchar16 for Arm® Compiler 5.

‑fno-short-wchar for Arm® Compiler 6.

‑‑split_sections is disabled by default ‑ffunction‑sections In Arm Compiler 5, functions are not put into separate ELF sections by default (--split_sections is disabled). In Arm Compiler 6, each function is put into a separate ELF section by default (-ffunction-sections).

‑‑split_sections for Arm® Compiler 5.

‑ffunction-sections for Arm® Compiler 6.

Non-ConfidentialPDF file icon PDF versionDUI0742J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.