Using volatile to Prevent Optimization of try/except (91149)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows NT 3.1
- the operating system: Microsoft Windows NT 3.5
- the operating system: Microsoft Windows NT 3.51
This article was previously published under Q91149 SUMMARY
The following is an example of a valid optimization that may take
programmers by surprise.
- A variable (temp) used only within the try-except body is declared
outside it, and therefore is global with respect to the try.
- Assignment to the variable (temp) is in the program only for a possible
side effect of doing a read memory access through the pointer.
Modification Type: | Major | Last Reviewed: | 3/15/2004 |
---|
Keywords: | KB91149 |
---|
|