Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/16/04 01:47
Read: times


 
#83208 - optimiser
Responding to: ???'s previous message
But cntr_1 and cntr_2 variables are very much part of my Delay routine and how do you say they are never used ?

But the only thing they are used for is as loop counters - the loops do nothing, and the counters are not used after the loops finish.

Thus, in terms of any observable effects outside the delay function (or even outside the loops), they do nothing. Therefore the optimiser could legitimately remove them.

Adding 'volatile' will not cost you anything, but will certainly ensure that you don't lose anything!



List of 22 messages in thread
TopicAuthorDate
Help LCD--89C51 using KEIL            01/01/70 00:00      
   RE            01/01/70 00:00      
   Keil?            01/01/70 00:00      
      Keil App Notes            01/01/70 00:00      
   Assembler programmer learning C?            01/01/70 00:00      
   So what happened to the USB, then?            01/01/70 00:00      
   The wanted code...            01/01/70 00:00      
      code            01/01/70 00:00      
         Tips and Tricks.....Andy            01/01/70 00:00      
            volatile.            01/01/70 00:00      
               Not so volatile ?            01/01/70 00:00      
                  optimiser            01/01/70 00:00      
                     Volatile warning?            01/01/70 00:00      
                        not here            01/01/70 00:00      
                        re: volatile            01/01/70 00:00      
                           volatile            01/01/70 00:00      
      Another comment - symbolic names            01/01/70 00:00      
   c code for lcd            01/01/70 00:00      
      code            01/01/70 00:00      
         symbolic Port names            01/01/70 00:00      
   There's Gratitude for you! :-(            01/01/70 00:00      
   A better method in C            01/01/70 00:00      

Back to Subject List