unnamed members of a structure

6.18 Structures and Unions

Moderators: misra-c, david ward

Posts: 3
Joined: Thu Oct 12, 2006 2:59 pm
Location: pune

unnamed members of a structure

Postby rahul_mishra » Fri Oct 13, 2006 5:37 am

Please let me know \"How do we access an unnamed member of a structure\"?

Its quite natural to use bitfields as unnamed members of a structure especially for padding. But, how do we access those unnamed members. Do we have to increment the pointer to access it? if yes, please illustrate it with an example.

Posts: 547
Joined: Thu Jan 05, 2006 1:11 pm

Postby misra-c » Tue Nov 21, 2006 3:18 pm

MISRA-C Steering Team - 7th November 2006

Do NOT access the unnamed members of a structure.

If you want to access such a member, give it a name. Any other mechanism is not allowed
Posted by and on behalf of
the MISRA C Working Group

Return to “6.18 Structures and Unions”

Who is online

Users browsing this forum: No registered users and 2 guests