BUG: Compiling with the In-Line Function Expansion Optimizations (/Ob1 and /Ob2 ) Fails to Generate C4716 (241592)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
This article was previously published under Q241592 SYMPTOMS
The Visual C++ compiler fails to generate a C4716 error message when compiling a nonvoid member function without a return statement with the /Ob1 or /Ob2 optimization.
Note that this problem happens only when the class member function is defined within the class definition.
Placing the nonvoid member function outside the class definition and marking it with the __inline keyword also fails to generate the error message.
RESOLUTION
To resolve this problem, use one of the following two resolutions:
- Do not use the compiler optimizations __inline(/Ob1) or Any Suitable(/Ob2).
- Place the member function definition outside the class definition.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 10/24/2003 |
---|
Keywords: | kbbug KB241592 |
---|
|