4 ms·
Of course C will also let you treat pointers as integers and vice versa, especially if you explicitly tell it to, by casts. But in the general case, it will whi
by Locke1689 16y ago
Of course C will also let you treat pointers as integers and vice versa, especially if you explicitly tell it to, by casts. But in the general case, it will whine and, in fact, reducing unnecessary whining is one of the reasons to not go hog-wild with useless typedefs. I'm not sure how we got here, I think one person here doesn't know C very well and the rest of us got into a little and completely tangential C nerdfest.
Hmm that's fair. I also think I started entering kernel-dev mode where you have to carefully watch everything that you do, whereas most people probably have C experience with the benefit of things like the C standard library.
For whatever it's worth, I was seeking to reference the idiom where you store an address as an integer in order to do some hardware operations. You have to keep semantic knowledge of that integer as really being a pointer even though it's, for the moment, stored as an integer. In cases like this the C compiler is no help whatsoever.