20140809 - Strict Aliasing


Strict aliasing from a different perspective. Full disclosure, for the most part at home I've moved on from C to my own language which is similar to an assembler running from a language similar to Color Forth. So my bias is more towards performance and minimalism.

When working in C, outside of work, I adopted labeling all pointers as either "restrict" or "volatile" (using the defines below to keep syntax tight). If needed reuse of a value read from a volatile pointer, it is read into a local variable. When working this way, strict aliasing makes no difference.

#define R_ restrict
#define V_ volatile