Don't allow extraneous factors (such as optimization or argument promotions)
to obfuscate the information you want.  If you want the sizes of the types,
print the sizes of the types.

#include <stdio.h>
int main(void)
    {
     printf("%zd %zd %zd", sizeof(short), sizeof(int), sizeof(long));
     return 0;
     }

> -----Original Message-----
> From: IBM Mainframe Discussion List <[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

Reply via email to