This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
C/C++ standard does not define the size of 'long int', but just requires that: sizeof(int) <= sizeof(long int). Win64 also uses the LLP64 model, that means long on Windows 64bit is also 4bytes long, but on most Unix 64bit systems long is defined as 8 bytes long. Since IBM i has been using 4 bytes for long, we are not going to change it, otherwise incompatibility for existing programs will be introduced.
I would suggest you define your own INT32, INT64 in your own program, especially if you are one copy of code for different platforms.
Due to processing by IBM, this request was reassigned to have the following updated attributes:
Brand - Servers and Systems Software
Product family - Power Systems
Product - IBM i
Component - Languages - Other
Operating system - IBM i
Source - None
For recording keeping, the previous attributes were:
Brand - Servers and Systems Software
Product family - Programming Languages
Product - C/C++ Compilers
Component - Miscellaneous
Operating system - IBM i
Source - None
Hi, apologies for the delay.
Thank you for the response. We have received it and will review it.
Once we have an update, we shall update this RFE.
Thanks.
Hello,
The following program, when compiled and linked with DTAMDL(*LLP64) STGMDL(*TERASPACE), shows that sizeof(pointer) is 8 but sizeof(long) is 4.
#include
int main(void)
{
int sp = sizeof(void *);
int sl = sizeof(long);
printf("sizeof pointer = %d, sizeof long = %d\n", sp, sl);
return (0);
}
The output:
sizeof pointer = 8, sizeof long = 4.
Please confirm that you have received the update. My previous comment posted on July 22 did not get acknowledged, and the request status is still "Additional Information Needed".
Thank you.
Lev Perelmuter
Strange, some time ago I added a comment providing the direct link requested by IBM (IBM_Rational_Developer) on June 5, 2019 but the case did not get updated. Trying again:
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzarh/sc092712.pdf
IBM Rational Development Studio for iILE C/C++ Programmer's Guide
Table 11-3 on page 11-3.
In the table, the length of the "long int" type is shown to be 4 bytes.
Hi, our understanding is that in 64 bit, the size of long is 8bytes.
Can you please provide the direct link where it states that its 4bytes?
This RFE is being investigated further.