INFO: Declaring a Pointer to a Function: C4071, C4001, or C4220 (49064)
The information in this article applies to:
- Microsoft C for MS-DOS
- Microsoft Visual C++ 1.0
- Microsoft Visual C++ 1.5
- Microsoft Visual C++ 2.0
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 4.0
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q49064 SUMMARY
In Microsoft C, the old method of declaring a pointer to a function,
type (*ptr)();
ptr = function;
causes the following compiler warnings when compiling with the "/W3"
option in C versions 6.0, 6.0a, and 6.0ax:
C4071: 'ptr' : no function prototype given
Microsoft C/C++ version 7.0 generates the following warning when the
"/W4" option is used:
C4001: nonstandard extension [...] was used
Visual C++, 16- and 32-bit editions, versions 1.0 and above generate the
following warning when the "/W4" option is used:
C4220: varargs matches remaining parameters
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbcode kbinfo kbLangC KB49064 |
---|
|