编译器警告(等级 3)C4645

用 __declspec(noreturn) 声明的函数有返回语句

在用 noreturn__declspec 修饰符标记的函数中发现了 return 语句。 忽略 return 语句。

下面的示例生成 C4645:

// C4645.cpp
// compile with:  /W3
void __declspec(noreturn) func() {
   return;   // C4645, delete this line to resolve
}

int main() {
}