Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unnamed members of a structure
#1
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.
#2
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


Forum Jump:


Users browsing this thread: 1 Guest(s)