Recently, found the union in the 'C' code with 33 bits as a structure and an unsigned long as members.
There will be no problem in the memory allocation. But, what might be the problem with this type of data structure?
Issue we had was the union variable initialization. Usually, the unsigned long variable in union will be initialized to intialize the bits in structure. But, being 33 bits, one bit won't be initialized. A learning we had!!
Subscribe to:
Post Comments (Atom)
2 comments:
Can you paste the code ? It will be much easier to understand. Thanks. And keep up your nice series of posts.
Post some sample code.
Post a Comment