harvard-architecture

Issue with NULL pointers on Harvard Architecture platform

Interesting issue we came across here this week. We are working in C on a Harvard Architecture embedded platform, which has 16-bit data addresses and 32-bit code addresses. The issue occurs when you are working with function pointers. If you have code like if (fp) fp(); or if (fp != 0) fp(); everything is fine. However if you ...