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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Per Westermark
12/04/11 05:32
Read: 581 times

#185013 - C90 conformance - not C99.
Responding to: Matthias Arndt's previous message
Note that the statement is about C90.
For C99 they only claim partial conformance.

But there is always a big problem being 100% conformant for a "toy" processor like the 8051.
You want the compiler to be as predictable as possible, based on the standard, while still producing efficient code.

Too much conformance means that the C code has to generate more assembler instructions or have to have a bigger reliance on calls to helper functions.

An example of this is the integer promotion rule. Keil supports it for conformance. But prefers to generate code without it, to avoid the inefficiences of updating everything to (at least) integer size before performing computations.

Pointers are the next big issue, since it would be very inefficient to always convert everything into generic pointers.

Some form of care will always be needed when using C on such a small target. The strength of C is that it is still possible to implement efficient programs using C on 8051-class processors. Many other languages would not get even close.

List of 13 messages in thread
stdint.h for Keil C?      Matthias Arndt      12/03/11 11:38      
   ! StdInt.h      Michael Karas      12/03/11 12:42      
      Make one        Per Westermark      12/03/11 15:11      
         Ofcourse      Matthias Arndt      12/04/11 01:51      
            SDCC's headers can be adapted      Matthias Arndt      12/04/11 02:25      
               That's the problem...      Andy Neil      12/05/11 14:29      
   So just write one!      Andy Neil      12/03/11 17:05      
   Does Keil claim C99 compliance at all?      Jan Waclawek      12/04/11 01:45      
      They have a statement on this...      Matthias Arndt      12/04/11 02:21      
         C90 conformance - not C99.      Per Westermark      12/04/11 05:32      
            I personally don't need full C99 compliance      Matthias Arndt      12/04/11 08:09      
               Yes possible. But maybe not economical.      Per Westermark      12/04/11 09:06      
               Not difficult      Andy Neil      12/04/11 14:36      

Back to Subject List