3 ms·
I think my point is dereferencing a pointer address zero is 'undefined' but here is the rub, what happens is entirely out of the optimizer and compilers control
by Gibbon1 12y ago
I think my point is dereferencing a pointer address zero is 'undefined' but here is the rub, what happens is entirely out of the optimizer and compilers control because it depends on the context that the program is run under. One can't determine at compile time what will happen.
In fact the compiler can't make any assumptions about a pointer whose value has been hard coded.
uint8_t b = (uint8_t) 0x30; // 0x30 is the address of PORT D on an AVR Atmega8