7.104 --min_array_alignment=opt

Specifies the minimum alignment of arrays.

Syntax

--min_array_alignment=opt
Where:
opt
specifies the minimum alignment of arrays. The value of opt is one of:
1
byte alignment, or unaligned
2
two-byte, halfword alignment
4
four-byte, word alignment
8
eight-byte, doubleword alignment.

Usage

ARM does not recommend using this option, unless required in certain specialized cases. For example, porting code to systems that have different data alignment requirements. Use of this option can result in increased code size at the higher opt values, and reduced performance at the lower opt values. If you only want to affect the alignment of specific arrays (rather than all arrays), use the __align keyword instead.

Default

If you do not use this option, arrays are unaligned (byte aligned).

Example

Compiling the following code with --min_array_alignment=8 gives the alignment described in the comments:
char arr_c1[1];      // alignment == 8
char c1;             // alignment == 1
Related reference
9.2 __align
9.3 __ALIGNOF__
Non-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.