Clyde Smith-Stubbs wrote: > There are two problems with [trying to judge a compiler against a > subjective "real" or "full" C standard rather than against the > ANSI standard] - firstly you're having a bet each way - if you are > judging the compiler by its usefulness for typical PIC > applications, then issues like recursion and pointers to bits are > irrelevant (you concede yourself that you have no use for > recursion, and I seriously doubt you ever even considered using a > pointer to a bit in an assembler program). Clyde: Actually, I use the machine-language equivalent of pointers to bits often enough that I've written a whole set of MPASM macros to handle them. > The other problem is, as you said, everyone might have their own > ideas about what they want in a compiler. Happily conceded. However, I think we can all agree that a compiler should be able to handle negative numbers, that if it understands pointers AND 16-bit variables it should also understand pointers TO 16-bit variables, and that it should be able to perform basic type conversions between 8-bit and 16-bit variables. > given minor extensions, ANSI C can do an excellent job on low-end > microcontrollers, with a good optimizing compiler. And using a > standard language allows you to use such features as long or float > arithmetic if you need them (but suffer no cost if you don't). > > The huge benefit of using an ANSI compiler on a PIC is not so much > portability of code (which is important, but less so than on larger > processors) but portability of people, i.e. programmers. I couldn't agree more. In fact, the answer to Question #12, "What are the relative merits of C versus Assembly-Language for microcontroller programming?" (in the "Miscellaneous" section of the "Answers" area on my company's web page) includes the following: If you spend your whole life honing your assembly-language skills, you won't be nearly as employable as any of the hundreds of thousands of C programmers out there. While C PROGRAMS aren't always portable from one processor to another, C PROGRAMMERS are. > For the record, I think using "short" for a bit variable, and "long" > for a 16 bit is a Bad Idea, as is Bytecraft's thing.0 notation for > bit access. For the record, I agree wholeheartedly. -Andy P.S. As usual... Just my opinion; I could be wrong. Andrew Warren - fastfwd@ix.netcom.com Fast Forward Engineering, Vista, California http://www.geocities.com/SiliconValley/2499