3 ms·
It can't be a valid C89 program. On many Harvard architecture based microprocessors data pointers and code pointers have differing size.
by poizan42 13y ago
It can't be a valid C89 program. On many Harvard architecture based microprocessors data pointers and code pointers have differing size.
- dietrichepp 13y agoDifferent size maybe, but different busses^H^H^H^H^H^Haddress spaces definitely, and using an address on the wrong bus is a sure way to cause problems.
- poizan42 13y agoOf course that is the definition of a Harvard architecture. It doesn't says that it won't link, just that it won't work. If compiling to an architecture with smaller sized code pointers than data pointers then the linker will most likely refuse to link it at all - otherwise it will have to truncate the adresses.
- kmm 13y ago^W will delete the previous word.
- mikeash 13y agoIs any crashing C program valid? You can only crash by invoking undefined behavior, and I believe that any program which invokes undefined behavior is "invalid". It's a major pitfall of C that determining "validity" requires solving the halting problem.