October 22, 2001 Re: Compiler feature: warnings on known exceptions? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Robert W. Cunningham | > They serve to avoid adding intermediate variables merely to bypass the side effects (variables that many compilers fail to optimize away). gcc is able to optimize some of them away and does it, if you debug the optimized code you'll notice that some of your variables dont exist afterall, and thus can't be inspected. > This especially applies when accessing hardware registers! If you've ever written a low-level device driver, you'd know. I did write low level (linux) drivers, and if I wanted I would have not needed them > In several compilers, you can flag such expressions as being atomic, so their execution cannot be interrupted part way through. As I see it sideeffect or not sideeffect situations have no influence on atomic-ness. - Axel -- |D) http://www.dtone.org | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply