Why are function pointers and data pointers incompatible in C/C++?

An architecture doesn’t have to store code and data in the same memory. With a Harvard architecture, code and data are stored in completely different memory. Most architectures are Von Neumann architectures with code and data in the same memory but C doesn’t limit itself to only certain types of architectures if at all possible.

Leave a Comment