On Fri, Nov 8, 2013 at 10:39 AM, Mike Stump <mikest...@comcast.net> wrote: > > On Nov 8, 2013, at 1:32 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > >> On Fri, Nov 8, 2013 at 5:03 PM, Mike Stump <mikest...@comcast.net> wrote: >>> On Nov 7, 2013, at 5:13 PM, Mingjie Xing <mingjie.x...@gmail.com> wrote: >>>> Well, it is my understanding that the warning should be emitted for a >>>> volatile variable only if it is not accessed. Initialization means >>>> accessing, even though it is not used anywhere. >>> >>> Let me try. A warning is useful, if there is no way a conforming program >>> can tell that the variable exists or not. So, the question is, how can you >>> notice the variable? Answer, there is no way, so, there is no utility in >>> having the variable. The warning is to tell the user to remove the dead >>> variable. >> >> I am sort of lost. > > I can try again. Begin your sentence, the important utility of this > construct is demonstrated by the following code: > > See if you can complete it. If not, then, then there is no utility. The > warning says, there is no utility. This isn't a theoretic thing, it is an > engineering thing.
Yeah, and as opposed to the non-volatile case removing the volatile set-but-unused variable even reduces code size! Richard.