
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
On Mon, 1 Dec 2003 00:17:44 -0500, Gene S. Berkowitz <[EMAIL PROTECTED]> wrote in comp.arch.embedded: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] says... > > On Sun, 30 Nov 2003 23:07:47 -0500, Gene S. Berkowitz > > <[EMAIL PROTECTED]> wrote in comp.arch.embedded: > > > > type. I've had to insert explicit casts exactly like this to get the > > > compiler to swallow it. > > > > That's absurd. Any compiler which will not accept this is horribly > > broken, so much so that it is lying if it claims to be a C compiler at > > all. > > You can call it whatever you like; it doesn't change the fact that > tools (I won't call it a C compiler, for your blood pressure), > especially those sold into the embedded market, are often non-standard > and/or broken. I can insert a cast, and the error goes away, or I > can deliver my code late because I'm spending two hours on the phone > explaining it to "tech support", then waiting 3 months for the fix. > > --Gene Are you claiming that you know of a compiler that generates a warning or error for this: unsigned char uc = P0; ...when the P0 macro is defined as: #define P0 ((*(__R volatile unsigned char *)0x0)) ...but does not when the P0 macro is defined as: #define P0 ((*(__R volatile unsigned char *)(unsigned char)0x0)) ??? I have sent back alleged C compilers this bad for a refund. It would be better to code in assembly than some language that some unqualified idiot made up. There is no quality control at all, and you would have no idea at all of what the code the compiler did accept would actually do when executed. If it could bungle something as basic as this, who knows what object code it would generate from other basic C source that it misinterprets? As for compilers for embedded systems, I have been using them for more than 20 years, for 8 through 32 bit controllers and processors, and for DSPs as well, so I think I am aware of the state of the market. -- Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html comp.lang.c++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
| <-- __Chronological__ --> | <-- __Thread__ --> |