This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

armcc

Note: This was originally posted on 5th April 2013 at http://forums.arm.com

Is there a compiler option or pragma that allows me to see "padding" in c structure?  

typedef struct st
{
  char a;
  int  b;
} mytype; Basically, say I have above defined struct then I wish to known how compiler pads it.

list file does not seem  to provide the needed details. 

--diag_warning=1301
--diag_warning=2530

I tried above options, it shows warning when ever the compiler pads but the issue is i still do
not get how many bytes and where the padding is applied in the structure.

is there a easy way to get those two details ?
0