This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Uninitialized Memory Read In Packed Enum


Hi,

When I use the "__attribute__ packed" option to compact enum from 4 bytes to 1 byte, it works well for saving memory when placed with other 1 byte data. However, when this packed enum is used to instantiate say a local variable, our memory tool (Purify) will complain that 3 out of the 4 bytes are uninitialized, causing a lot of UMR errors. Is there any way to work around this problem to keep the memory tool happy?

Thanks,

Alexandra


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]