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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/22/08 12:57
Read: times


 
#158507 - Compiler-specific?
Responding to: ???'s previous message
Erik Malund said:
while it is not wrong to use 'const code' albeit const being superfluous

It may or may not be superfluous, depending on the compiler.

I think it is superfluous for Keil - but the OP isn't using Keil.

I think this is one of those cases where being explicit wins over trying to "optimise" the source text?


"adding in the CONST keyword" will not make it 'code'

That is certainly true of Keil but, again, may not be true of others.

It is certainly true that some non-8051 compilers can take 'const' to mean "put this in ROM"...




List of 15 messages in thread
TopicAuthorDate
Location of Pointers in XDATA            01/01/70 00:00      
   What does datasheet says?            01/01/70 00:00      
   RC-51 ref manual, pg 51            01/01/70 00:00      
      ahh so easy when you read the instructions            01/01/70 00:00      
         xdata?            01/01/70 00:00      
            too?            01/01/70 00:00      
               Well yes actually - now that you mention it            01/01/70 00:00      
                  what do you really want?            01/01/70 00:00      
                     You are correct you supplied the answer as asked            01/01/70 00:00      
                        wronk 'keyword'            01/01/70 00:00      
                           const + code            01/01/70 00:00      
                              the compiler is smart enough to ...            01/01/70 00:00      
                                 Compiler-specific?            01/01/70 00:00      
                                    It didn't actually compile with CONST            01/01/70 00:00      
                                       const is expected to catch non-const assigns            01/01/70 00:00      

Back to Subject List