Visual C++ Compiler Warning C4294

Message Text

C++ Exception Specification missing

Circumstances

This warning condition occurs when a function is declared with a C++ exception specification which is then omitted from the definition.

Warning C4294 is unusual in that it is ordinarily ignored, regardless of either the current cut-off level (as set through the /W option) or the use of /Wall. To get the compiler to report occurrences of this warning, either force a level for it (as through /w1, etc) or promote it to an error (as through /we).

Example

The following fragment triggers warning C4294 (at the opening brace in the function definition).

void func (void) throw ();

void func (void)
{
}