A Collection of Examples of 64-bit Errors in Real Programs
software.intel.com
software.intel.com
This is definitely one of the more colourful technical documents I've read.
Yeah, because a language with 4 different typecast operators is type safe.
C++ pretends to be a safe language with features like encapsulation. The problem is that it isn't. One bad strcpy later and your "encapsulated" class's data is now "HELLO WORLD\0".
C, on the other hand, makes no effort to pretend that the abstraction being offered is anything other than a big block of RAM and some functions.
(If you want a safe language, use Haskell. Notice how nobody ever needs "unsafeCoerce :: a -> b"?)
http://en.wikipedia.org/wiki/64-bit#Specific_C-language_data...
A lot of the problems are due to the assumption an integer is big enough to store a pointer.
Just wondering: is there a way to make the compiler barf if such an assignment is done? Or for generating a runtime error if the assignment doesn't fit?
If you never acquire the habit of writing sloppy code and ignoring warnings, it's not even that bad. In fact, it's only the kids who already know C coming in who complain about the stricter flags.
Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defects in 64-bit programs - http://www.viva64.com/en/a/0066/
64 bits, Wp64, Visual Studio 2008, Viva64 and all the rest - http://www.viva64.com/en/a/0021/
Used to be (old guy talking) 'int' meant 'register size' so on a 64-bit target it whould be 64 bits. Whereupon all the 'bugs' evaporate.
you are correct inasfar as ssize_t is a posix extension.
504 Gateway Time-out nginx
Is this one of the example 64-bit errors?
Edit: Now it's working