diff options
author | Hans Breuer <hans@breuer.org> | 2002-01-05 18:54:59 +0000 |
---|---|---|
committer | Hans Breuer <hans@src.gnome.org> | 2002-01-05 18:54:59 +0000 |
commit | abc754faca50c2a41ae390481856d7e4afd58399 (patch) | |
tree | c1546a1ca7a9e4a10cead9ad459015d5cb703571 /msvc_recommended_pragmas.h | |
parent | 7e92a2b3255ff5916b5d83c1a76b18e1984924db (diff) |
moved warning to error pragmas to their own file to not force 'good
2002-01-05 Hans Breuer <hans@breuer.org>
* glibconfig.h.win32.in
msvc_recommended_pragmas.h (new file) : moved warning to
error pragmas to their own file to not force 'good practice'
programming in downstream libs and apps. Instead the new header
will be used by -FImsvc_recommended_pragmas.h in gnome/cvs
makefile.msc
* */makefile.msc.in : use -FImsvc_recommended_pragmas.h
Diffstat (limited to 'msvc_recommended_pragmas.h')
-rw-r--r-- | msvc_recommended_pragmas.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/msvc_recommended_pragmas.h b/msvc_recommended_pragmas.h new file mode 100644 index 000000000..ee34eef4d --- /dev/null +++ b/msvc_recommended_pragmas.h @@ -0,0 +1,28 @@ +#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(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ |