Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

option -Werror-all changes double alignment with icpc 11.1

ttressieres
Beginner
214 Views
I have icpc (ICC) 11.1 20100414, if i write a c++ program

[cpp]#include 

struct A {
  int a;
  double b;
};

int main() { std::cout << sizeof(A) << std::endl; return 0; }[/cpp]

If i compile with icpc -Werror-all main.cpp, i have 16
if i compile with icpc main.cpp, i have 12

I think it's a bug because error diagnostics option shoudn't change data alignment !
0 Kudos
2 Replies
Judith_W_Intel
Employee
214 Views

This problem has been fixed in our 12.0 compiler as of last April(cq #167827 and Quad 625034). Please upgrade to a recent compiler to get the fix.

0 Kudos
ttressieres
Beginner
214 Views
Thanks, i will try it asap
0 Kudos
Reply