[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Strings: escape sequence to insert arbitraryhexvalue

From: Graham Davies
Subject: Re: [avr-gcc-list] Strings: escape sequence to insert arbitraryhexvalue ?
Date: Tue, 10 Feb 2009 16:59:57 -0500

J"org wrote:

"As the code works as is (with the warning), I bet the volatile
qualification wasn't needed at all in the first place, and could as
well be omitted."

Glurgh ... (more strangling sounds) ... that's not my understanding of how things should be done. If a variable requires volatile treatment, just because it works today without it does not mean you can leave it out. If you change the compiler, or just rearrange a bit of code, then the forbidden optimizations could appear and break it. Correct me if I'm wrong, but my impression is that the programmer must identify all variables that should be qualified volatile by thinking about the program logic and that the purpose of the warning we're discussing is precisely to tell him that volatile treatment is not guaranteed and he should think about it some more.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]