Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.25 KB

compiler-warning-c4430.md

File metadata and controls

33 lines (25 loc) · 1.25 KB
description title ms.date f1_keywords helpviewer_keywords
Learn more about: Compiler Warning (level 1, error) C4430
Compiler warning (level 1, error) C4430
04/22/2025
C4430
C4430

Compiler Warning (level 1, Error) C4430

missing type specifier - int assumed. Note: C++ does not support default-int

This warning is issued when a type specifier is missing in a declaration. The compiler used to assume the type was int in this case. But due to compiler conformance work done for Visual Studio 2005, all declarations must explicitly specify the type.

C4430 is always issued as an error. You can turn off this warning with the #pragma warning or /wd. For more information, see warning or /w, /W0, /W1, /W2, /W3, /W4, /w1, /w2, /w3, /w4, /Wall, /wd, /we, /wo, /Wv, /WX (Warning Level).

Example

The following sample generates C4430:

// compile with: /c
struct CMyClass {
   CUndeclared m_myClass;  // C4430
};

typedef struct {
   someFunction();   // C4430
   unsigned x;
   unsigned y;
} POINT;

To fix this code, you'd need to define the type CUndeclared and the function someFunction prior to their use.