Code: Select all
C++; // Makes C bigger and returns the original value!
Code: Select all
C++; // Makes C bigger and returns the original value!
Trond wrote: And WHICH IDIOT made a SYSTEM programming language WITHOUT putting the BIT SIZES of the standard types into the standard? A valid 32-bit C compiler for x86 can, while following the standard, have an 8-bit int and a 64-bit long long (as long as a short and char is no more than 8 bits either). Only conventions keeps the programs running, not the standard.
That's not true. It would be possible to define sizes for different architectures. Also, it would be possible to have defined sizes for some types and then have a generic type that matches the processor native size.dell_jockey wrote:Trond wrote: And WHICH IDIOT made a SYSTEM programming language WITHOUT putting the BIT SIZES of the standard types into the standard? A valid 32-bit C compiler for x86 can, while following the standard, have an 8-bit int and a 64-bit long long (as long as a short and char is no more than 8 bits either). Only conventions keeps the programs running, not the standard.
Well, actually, the idiot you are referring to, Trond, is a guy that made sure that C is as portable as it is.
By not defining bit sizes of 'standard types' à priori, but putting the definition in header files - and employing a lot of other techniques like this one - a C compiler is portable across a remarkable range of architectures, be it from small 8-bit microprocessors, old VAX / PDP architectures, contemporary Intel stuff or all the way up to the Cray league...