-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathmsvc_recommended_pragmas.h
38 lines (33 loc) · 1.94 KB
/
msvc_recommended_pragmas.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef _MSC_VER
#pragma error "This header is for Microsoft VC only."
#endif /* _MSC_VER */
/* Make MSVC more pedantic, this is a recommended pragma list
* from _Win32_Programming_ by Rector and Newcomer.
*/
#pragma warning(error:4002) /* too many actual parameters for macro */
#pragma warning(error:4003) /* not enough actual parameters for macro */
#pragma warning(1:4010) /* single-line comment contains line-continuation character */
#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */
#pragma warning(1:4016) /* no function return type; using int as default */
#pragma warning(error:4020) /* too many actual parameters */
#pragma warning(error:4021) /* too few actual parameters */
#pragma warning(error:4027) /* function declared without formal parameter list */
#pragma warning(error:4029) /* declared formal parameter list different from definition */
#pragma warning(error:4033) /* 'function' must return a value */
#pragma warning(error:4035) /* 'function' : no return value */
#pragma warning(error:4045) /* array bounds overflow */
#pragma warning(error:4047) /* different levels of indirection */
#pragma warning(error:4049) /* terminating line number emission */
#pragma warning(error:4053) /* An expression of type void was used as an operand */
#pragma warning(error:4071) /* no function prototype given */
#pragma warning(error:4150)
#pragma warning(disable:4244) /* No possible loss of data warnings: Win32 */
#pragma warning(disable:4267) /* No possible loss of data warnings: x64 */
#pragma warning(disable:4305) /* No truncation from int to char warnings */
#pragma warning(disable:4146) /* Unary minus operator applied to unsigned type, result still unsigned */
#ifndef __cplusplus
#pragma warning(disable:4018) /* No signed unsigned comparison warnings for C code, to match gcc's behavior */
#endif
#ifdef __cplusplus
#pragma warning(disable:4800) /* Forcing value to bool 'true' or 'false' warnings */
#endif