??? 01/08/07 14:38 Read: times |
#130426 - sort of... Responding to: ???'s previous message |
Andy Neil said:
Where the problem comes is when you are specifically accessing a multibyte variable that is shared with an ISR.
Is that where you're concerned? Yes. Theoretically, a C-compiler might "know" whether this happens or not (OK this gets rather tricky if the ISR accesses other functions, possibly declared externally - then all global variables are suspected, but that might raise a simple warning - I don't think it is too common to have extensive ISRs like that). It then might either raise a more specific warning, or (maybe upon a switch or pragma) flag these variables as "critical" automatically. A keyword to flag a variable or a function or a sequence of command "critical" would be better than nothing - but if I understand correctly, there is no such flag for _variables_ in Keil nor SDCC. "volatile" comes into mind, but that is intended for something else, isn't it. I believe a feature like this could considerably raise the quality of output of many C "coder" ... :-) Jan Waclawek |