__declspec bug

__declspec bug

Arg, I found this out after hours of trying to get old code to work...


struct __declspec(align(8)) foo { char a; };

int main()
printf("%u", unsigned(sizeof foo));
return 0;

msvc 6.0 prints 8, icl 6.0 prints 1.

Anyone know what this prints in vc.net 2003 or the latest icl?

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

VS.NET 2k3 prints 8

icl 7.1 spits "1"

Leave a Comment

Please sign in to add a comment. Not a member? Join today