??? 05/25/10 10:15 Read: times |
#176167 - legal C reused by Keil Responding to: ???'s previous message |
Keil decided it was wise to reuse legal C constructs to define sfr and sbit. The '=' is an assignment and '^' performs an XOR operation. So they should not generate an error, but a warning could be feasible.
Even though it is not upto SDCC to fix what Keil broke, I created several years ago a header file called compiler.h that tries to compensate for compiler differences through preprocessor macros. SiLabs have already adopted and extended this file. Maybe a little bit more generic would be for SDCC to warn about sfr/sbit declarations that are neither 'extern' nor have an '__at' attribute. I wouldn't be surprised if this is already a feature request in the tracker system. Maarten |