Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So your conclusion is that the original code is more logical with regard to volatile pointers, even though calling it with one would mean casting away the volatile and basically inviting disaster?

No coding style is immune to problems caused by changing the number of reads to a variable. Volatile is an exceptional thing that must be treated with care and heavy documentation. It has no relevance to the quality of a normal-code strcpy.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: