Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7693 Discussions

option -Werror-all changes double alignment with icpc 11.1

ttressieres
Beginner
138 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
138 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.

ttressieres
Beginner
138 Views
Thanks, i will try it asap
Reply