Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.11 KB

compiler-warning-level-4-c4668.md

File metadata and controls

36 lines (28 loc) · 1.11 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 4) C4668
Compiler Warning (level 4) C4668
11/04/2016
C4668
C4668
c6585460-bc4a-4a15-9242-4cbfce53c961

Compiler Warning (level 4) C4668

'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives'

A symbol that was not defined was used with a preprocessor directive. The symbol will evaluate to false. To define a symbol, you can use either the #define directive or /D compiler option.

This warning is off by default. See Compiler Warnings That Are Off by Default for more information.

Example

The following sample generates C4668:

// C4668.cpp
// compile with: /W4
#include <stdio.h>

#pragma warning (default : 4668)   // turn warning on

int main()
{
    #if q   // C4668, q is not defined
        printf_s("defined");
    #else
        printf_s("undefined");
    #endif
}