Back in my PL/X days, I think we did something like this:
dcl
1 abigstructure,
3 <some stuff>
3 a64bitpointer ptr(64),
5 * fixed(32),
5 a31bitpointer ptr(31),
3 <more stuff>
;
So we could reserve the space for the high order word of a future 64-bt pointer for future use.
I think you could probably come up with an analogous "struct" in C the does something similar?
In the future you'd need to do a "change all" in the functional code from a31bitpointer to a64bitpointer or use better names and just change the variable name in the structure...
<apologies to those reading, Nancy and I have a history of torturing each other over which language is better...>
Scott
------------------------------
-------------------------
Scott Fagen
Mainframe Evangelist
CDW
www.cdw.com------------------------------
Original Message:
Sent: Fri June 30, 2023 09:31 AM
From: Linda Chui
Subject: 64bit pointers for nonMetal C program that runs ILP31
hi Nancy,
Unfortunately there is no way to add in a qualifier via typedef or other language mechanism as those are syntax constructs. The best approach is what was shown in the header: Using an "unsigned long long" type and casting it as needed.
Hope this helps.
------------------------------
Linda Chui
Compilation Technology & Enterprise Products
IBM Canada
------------------------------