Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
armcc
Jump...
Cancel
Locked
Locked
Replies
2 replies
Subscribers
118 subscribers
Views
4214 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
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
Simha JKC
over 12 years ago
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 ?
Parents
Scott Douglass
over 12 years ago
Note: This was originally posted on 8th April 2013 at
http://forums.arm.com
I don't think there is a way to get the compiler to be more specific about the padding. The structure layout rules are in section 4 of the ABI
http://infocenter.ar...042e/index.html
. You could manually add 'char dummy1;' members until the padding warnings go away and then you'll know that you've identified all of the padding.
Cancel
Vote up
0
Vote down
Cancel
Reply
Scott Douglass
over 12 years ago
Note: This was originally posted on 8th April 2013 at
http://forums.arm.com
I don't think there is a way to get the compiler to be more specific about the padding. The structure layout rules are in section 4 of the ABI
http://infocenter.ar...042e/index.html
. You could manually add 'char dummy1;' members until the padding warnings go away and then you'll know that you've identified all of the padding.
Cancel
Vote up
0
Vote down
Cancel
Children
No data