Compiler Warning (level 1) C4508
'function' : function should return a value; 'void' return type assumed
The function has no return type specified. In this case, C4430 should also fire and the compiler implements the fix reported by C4430 (default value is int).
To resolve this warning, explicitly declare the return type of functions.
The following sample generates C4508:
// C4508.cpp
// compile with: /W1 /c
#pragma warning (disable : 4430)
func() {} // C4508
void func2() {} // OK
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for