Connecting Tech Pros Worldwide Forums | Help | Site Map

(part 36) Han from China answers your C questions

Nomen Nescio
Guest
 
Posts: n/a
#1: Nov 21 '08
Nick Keighley said:
Quote:
Quote:
>That ( char * ) ( &Dest ) is like two cups of redundancy. I'd hate to
>think that this embedded system is a pacemaker or something.
>
that would all be sorted out at compile time on any reasonable
compiler. Both address-of and casting between pointers are free at run-
time.
Obviously, Nicky. But that redundancy doesn't give one much confidence
in the run-time code, does it? I thought I was making an obvious CLC-reg
point (the same point has been made in relation to malloc casts and other
kinds of void* casts). Would you use a pacemaker written by the coder in
question? Or a smart vibrator, as the case may be...
Quote:
Quote:
>As for "does address 0 contain a pointer to wherever aStruct actually
>lives?", no and yes. No, the code appears to be referring to a structure
>that begins at address 0, or at least is temporarily treating the data
>there as a structure. Yes, [its] possible address 0 is in some sense a
>pointer (though not in the C sense),
>
nonsense
Yes, well, you changed my "it's" to "[its]". Of course it's now nonsense.
Quote:
Quote:
>since the ARM MMU supports virtual
>memory, and the actual address that winds up on the address bus needn't
>refer to a real address of 0.
>
by "real" I assume you mean "physical". In what sense is the address/
pointer referred to in the C program not-real? You seem to be adding
unnecessary confusion (surprise!)
http://en.wikipedia.org/wiki/Physical_address

"In computing, a physical address, also real address, or binary
address, is the memory address that is electronically ..."

You seem to have understood me just fine, Nicky. And if Nick
Keighley understands me, I have great faith that everyone else
on CLC understands me. Just kidding, Nicky.


Yours,
Han from China


Closed Thread


Similar C / C++ bytes