That is very weird. We are essentially using the same compiler with compiler extensions turned on, but the results are different. Have you checked with my test program?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Actually I'll have to reboot to do that but i'll give it a shot. brb
I received the compiler error for this like expected. Then I modified it for a typedef:Code:#include <iostream> int main() { std::cout << sizeof int << std::endl; }
And it compiled without error using VC++ Express 2005.Code:#include <iostream> typedef int int32; int main() { std::cout << sizeof int32 << std::endl; }
This has been fun, bit of a mind boggle huh
Thanks, I can confirm that. Since the behaviour remains the same even with compiler extensions turned off, I conclude that this is an area where the compiler simply does not conform to the standard.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)