30.6. Enforcing aligned data

The assembler normally permits data to be misaligned. For example, it permits the .long directive to be used on a byte boundary. However, the native Sun-OS and Solaris assemblers issue an error when they see misaligned data.

You can use the --enforce-aligned-data option to make The assembler also issue an error about misaligned data, just as the Sun-OS and Solaris assemblers do.

The --enforce-aligned-data option is not the default because the compiler issues misaligned data directives when it initializes certain packed data structures (structures defined using the packed attribute). You may have to assemble with The assembler in order to initialize packed data structures in your own code.