Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29281 Discussions

warning #6379: The structure contains one or more misaligned fields.

bucaioni__thomas
New Contributor I
2,581 Views

Apparently, some fields are misaligned but in the source code the indentation is fine. What is the meaning of misalignment?

0 Kudos
1 Solution
mecej4
Honored Contributor III
2,563 Views

You may be able to rearrange the order of the elements in the structure and add padding (or remove attributes that inhibit padding) to mitigate the alignment problem.

You can use compiler options to turn off the warning.

Unless you have conducted studies to establish that the misalignment problem is significant, however, I'd suggest that you take note of the issue and put it aside.

View solution in original post

0 Kudos
3 Replies
mecej4
Honored Contributor III
2,576 Views

The warning is about misalignment of data in memory when your program is running and accessing the memory locations occupied by members of the structure, not about the alignment of the characters of the source code in a text editor!

Regarding the issues related to misalignment, see, for example, https://en.wikipedia.org/wiki/Data_structure_alignment .

0 Kudos
bucaioni__thomas
New Contributor I
2,568 Views

Is there anything I can do about it?

0 Kudos
mecej4
Honored Contributor III
2,564 Views

You may be able to rearrange the order of the elements in the structure and add padding (or remove attributes that inhibit padding) to mitigate the alignment problem.

You can use compiler options to turn off the warning.

Unless you have conducted studies to establish that the misalignment problem is significant, however, I'd suggest that you take note of the issue and put it aside.

0 Kudos
Reply