Altera_Forum
Honored Contributor
20 years agowhy use the "volatile" keyword
Hey guys, I'm working on some ISR sofware development, and I am wondering why the software developer's hand book declares variables as "volatile int*" and "volatile int" rather then just "int*" and "int". The manual says that "the volatile keyword only prevents the compiler from optomizing out accesses using the pointer". Does this mean if the volatile keyword isn't used the compiler will ignore statements involving referencing and dereferencing pointers? Thanks for the help!
-Jon