+ 2

What is the use of volatile member function

27th Sep 2017, 8:21 AM
Mukul
Mukul - avatar
3 Answers
+ 6
Volatile qualifier forces the compiler to ignore some regular optimization in your code. See the full description here [https://www.sololearn.com/Discuss/701288/c-bread-butter-part-2-1] section: coffee break. Note: sort the posts by date
27th Sep 2017, 11:00 AM
Babak
Babak - avatar
+ 2
It means that the function will not be optimized (content not modified) For asm call, you do not want the compiler to change your asm code, so you'll need volatile
27th Sep 2017, 8:48 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar