Matthew Smith <[EMAIL PROTECTED]> wrote: > volatile uint8_t foo;
> extern uint8_t foo; Note that they don't match. The extern declaration is missing the "volatile" keyword. Keep in mind that volatile is nothing like a memory allocation attribute or such that, once stuck onto a variable, would be accessible to anyone using that variable. Instead, it is a so-called type qualifier, something that's purely intented for the compiler to adjust its compilation strategy. Thus, it must be guaranteed that each part of the compilation knows about that qualifier. As Russell already mentioned, the best way to maintain that is by placing a single declaration of the variable into a central header file that is included from all source files. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
