??? 01/10/11 08:28 Read: times |
#180491 - legality of indexing NULL pointer Responding to: ???'s previous message |
I am not sure about the "legal" status of indexing a NULL pointer (which is what you get when you cast 0 to a pointer). This is the result of the "relaxed" nature of C - as there is no dedicated "nil" pointer, pointer with value 0 has a special status.
You should consider using either a different "starting" pointer, or maybe better use the native absolute addressing through keyword __at (see chapter 3.6 of the Manual). That SDCC should not throw a FATAL Internal error on this is another issue; but I see that you've already submitted a bug report to the SDCC tracker. JW |
Topic | Author | Date |
sdcc internal error / C syntax | 01/01/70 00:00 | |
legality of indexing NULL pointer | 01/01/70 00:00 | |
bug | 01/01/70 00:00 | |
version | 01/01/70 00:00 | |
version revisited | 01/01/70 00:00 | |
thank you | 01/01/70 00:00 | |
Fixed | 01/01/70 00:00 | |
no snapshot | 01/01/70 00:00 | |
works | 01/01/70 00:00 | |
0 is special - but so is NULL. indexing around NULL is bad | 01/01/70 00:00 | |
No guarantee that a NULL pointer points to any memory | 01/01/70 00:00 | |
time | 01/01/70 00:00 | |
I know :-( | 01/01/70 00:00 | |
Use of __at ? | 01/01/70 00:00 | |
What is "that way"? | 01/01/70 00:00 | |
the antique version.... | 01/01/70 00:00 | |
XBYTE macro | 01/01/70 00:00 | |
Okay, then the following definition... | 01/01/70 00:00 | |
RE: David's remarks about volatility | 01/01/70 00:00 | |
Close, but no cigar | 01/01/70 00:00 | |
Avoid the 'volatile' | 01/01/70 00:00 | |
instead of offsetting... | 01/01/70 00:00 | |
Dereferencing a '_REG | 01/01/70 00:00 | |
I agree | 01/01/70 00:00 | |
Use of __at ? [ed] | 01/01/70 00:00 |