The question and the subject do not seem to go together.

Shorts are 16 bits; long and long ints are 32 bits on most modern C
compilers.

As @John says, statements that "don't matter" go away. If you set len and
then do not use it, the compiler is free to disregard the setting.

Try the volatile attribute and see if that helps. 

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Joseph Reichman
Sent: Sunday, April 26, 2020 6:58 AM
To: [email protected]
Subject: XL C\C ++ sizeof of datatypes

 

 

HI 

 

   I am looking in the XL C docs lang reference user guide programming guide


 

For the length of the following data types 

 

                  Short , int long and I cannot seem to find it

 

frustrated 

 

              I coded a program

Int len; 

Unsigned short shortype;

Int len = sizeof(shorttype);

 

                   But the compiler seemed to comment the above statement
and not generate the assembler ps (I am running metal c);

 

                        Any help appreciate it

 

 

 

 

 

 

 


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to