Paul Hutchinson wrote: > It works very well for me. The only C compiler I use that needed a custom > LCD file is CCS PCM. For all the other C compilers I use, the standard > ansi.lcd works fine. > > Perhaps the people saying it's not appropriate for small micros also feel > that standard C is not appropriate for small micros. After all, C was > designed for and works best, on 16 bit and bigger systems. There was this one example recently (http://www.splint.org/pipermail/splint-discuss/2004-November/000516.html): static uint8_t n; void foo(void) { n = 5; } splint seems to assume that 5 is an int (that is, 16 or 32 bit), and it pops up a warning. The presented solutions were all inadequate: using character literals (pretty much unreadable and defeats the purpose of using such a tool to create /better/ code), casting the literals (that would hide even worse errors), or switch off the type of warning with /*@+charint@*/ which seemingly also lets the following code pass without a warning where one would be warranted (even though one could say that this is something the compiler would warn me about): uint8_t n; uint16_t u; foo(void) { n = u; } How are you handling this issue? > Next, and I feel this is important, I cranked > up the compiler settings to as high as possible. After making sure I fully > understood all the warnings and their implications, I modified the code to > make the compiler give no warnings. That's not really possible with the HiTech compilers. In the highest setting, they give warnings about constructs that are necessary -- for example assigning the two bytes of a 16-bit unsigned int to two separate unsigned char. Gerhard _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist