4.2.4.11 Specifying alignment value for branch destination addresses

The alignment value for function start addresses and branch destination addresses is set to 4.

#pragma align4 ( function-specification [, function-specification]... )Note
  function-specification: function-name [(spec)]

Note

The outer parentheses can be omitted.

-

One of the following can be specified as spec.

Spec

Description

function

Sets the alignment value for function start addresses to 4.

loop

Sets the alignment value for function start addresses and the start addresses of all loops to 4.

innermostloop

Sets the alignment value for function start addresses and the start address of the innermost loop to 4.

all

Sets the alignment value for function start addresses and all branch destination addresses to 4.

An error will occur if any other item is specified for spec.

If the specification of spec is omitted, it is assumed that function has been specified.

-

If this option is specified simultaneously with the -Xalign4 option, the specification by #pragma align4 becomes valid.

-

#pragma align4 can be specified only once for a single function. If it is specified more than once, an error will occur.

-

If a function that does not specify #pragma align4 is included or an object module file or a standard library that has been generated through compilation without using the -Xalign4 option is specified for linkage, the warning W0561322 will be output at linkage but program execution will have no problem.