I am implementing a C-based programming language and I would like to implement a compilation mode that is agnostic to whether it runs in 32-bit or 64-bit mode. All my data types have explicit width, so binary compatibility there is not a problem, the only problematic aspect is pointers.
So what if I go for an explicit 64-bit implementation of pointers even under 32-bit mode? IIRC pretty much all memory controllers are at least 64-bit, so reads and writes will still be a single cycle, but what about integer arithmetic?
Besides the increase of memory footprint, are there any potential drawbacks to such an approach? Any other potential caveats?
Edit:
Let me clarify the scenario context - the original question was a little off. I need that "binary agnostic mode" for an interpreter bytecode to be able to dynamically bridge different native binaries. Naturally, there is little to no point of using a pointer from a 64-bit binary in a 32-bit binary, but the width of the pointers affects the offsets for the locations of the other data, which is what will primarily be interchanged. So in short, the idea is the following - waste a bit of space for the sake of making a data structure binary compatible to both 32 and 64-bit binaries.