This documentation is archived and is not being maintained.

Compiler Warning (levels 1 and 4) C4112

#line requires an integer between 1 and number

The #line directive specifies an integer outside the allowable range.

If the specified number is less than 1, the line counter is reset to 1. If the specified number is greater than number, the line counter is unchanged. This is a level 1 warning under ANSI compatibility (/Za) and a level 4 warning with Microsoft extensions (/Ze).

The following sample generates C4112:

// C4112.cpp
// compile with: /W4
#line 0   // C4112, value must be between 1 and number

int main() {