...and right now I'm feeling like an idiot, because I completely missed the pointer issue.
I completely understands the pointer issue, and I feels like an idiot while compiling my programs the same way.
From the ANSI C times, if two data types are equally sized in bits on the compiler definition (ex. char and bool were both 8 bits, and int, enums and pointers were both 16 bits on a old compiler I used to use), you can use them indiscriminately on the same expression without further considerations.
Worst, if you mix 8 bits and 16 bits data on an expression, the compiler will happily "promote" the 8 bits to 16 by adding zeros to the left (or 1s, if the variable is declared as signed and the value is negative - humm... not sure if I'm right, perhaps I'm talking about some other language now...).
We call this mess a "weakly typed" system. The datum are typed, but the type is not strictly enforced.
See that I'm not against mixing data types. Sometimes you really want to add 8 to a pointer in order to access something you know it's 8 bytes after the address on the pointer (it's how structs are implemented down there on the metal, by the way).
What makes things a living hell is this being done automagically by the compíler - so any mistake you do is terribly hard to detect. The guys from that times invented a pre-compiler phase called "lint" in order to get the errors that can be detected statically (i.e., that you don't have to run the program to detect it).
C++ at first introduced Objects to this mess, and things became even messier.
At least things are becoming better with last C++ revisions, as it appears.
