Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.6 KiB

  1. // Copyright (c) 2000 Microsoft Corporation
  2. //
  3. // pragma warnings
  4. //
  5. // 8 Feb 2000 sburns
  6. // disable "symbols too long for debugger" warning: it happens a lot w/ STL
  7. #pragma warning (disable: 4786)
  8. // disable "exception specification ignored" warning: we use exception
  9. // specifications
  10. #pragma warning (disable: 4290)
  11. // who cares about unreferenced inline removal?
  12. #pragma warning (disable: 4514)
  13. // we frequently use constant conditional expressions: do/while(0), etc.
  14. #pragma warning (disable: 4127)
  15. // some stl templates are lousy signed/unsigned mismatches
  16. #pragma warning (disable: 4018 4146)
  17. // we like this extension
  18. #pragma warning (disable: 4239)
  19. // Use of pointer types with STL container classes generates this beauty,
  20. // which is a warning because if the situation it warns agains is
  21. // ever encountered, that code will fail to compile.
  22. //
  23. // The problem is that iterator classes define operator-> to return a pointer
  24. // to the element type T of the container. When that element is itself a
  25. // pointer, then the return type of is a pointer to pointer, which has no
  26. // members or methods to invoke. So code like
  27. //
  28. // list<Foo*> l;
  29. // list<Foo*>::iterator i = l.begin();
  30. // i->f();
  31. //
  32. // will not compile, as the type Foo* does not have a method f(). So if the
  33. // code will not compile, why warn about the potential for such code to exist?
  34. #pragma warning (disable: 4284)
  35. // often, we have local variables for the express purpose of ASSERTion.
  36. // when compiling retail, those assertions disappear, leaving our locals
  37. // as unreferenced.
  38. #ifndef DBG
  39. #pragma warning (disable: 4189 4100)
  40. #endif // DBG