Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.05 KB

compiler-warning-levels-1-and-4-c4112.md

File metadata and controls

26 lines (20 loc) · 1.05 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (levels 1 and 4) C4112
Compiler Warning (levels 1 and 4) C4112
11/04/2016
C4112
C4112
aff64897-bb79-4a67-9b6f-902c6d44f3dc

Compiler Warning (levels 1 and 4) C4112

#line requires an integer between 1 and number

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

If the specified parameter is less than 1, the line counter is reset to 1. If the specified parameter is greater than number, which is the compiler-defined limit, 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() {
}