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: Merging changes to volatile bitfield structs


Hi Phil,

> Can anyone share their preferred approach to this sort of problem?

Reg workingReg = reg;
workingReg.a = 0;
workingReg.b = 0;
workingReg.c = 0;
reg = workingReg;

HTH,
--Eljay


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