Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Warning (level 1) C4995

Error Message

'function': name was marked as #pragma deprecated

The compiler encountered a function that was marked with pragma deprecated. The function may no longer be supported in a future release. You can turn this warning off with the warning pragma (example below).


The following sample generates C4995:

// C4995.cpp
// compile with: /W1
#include <stdio.h>

// #pragma warning(disable : 4995)
void func1(void)
    printf("\nIn func1");

int main() 
    #pragma deprecated(func1)
    func1();   // C4995

Community Additions

© 2015 Microsoft