-2

If i choose Level warning(all) /Wall

Studio show many warnings from this files:

wchar.h
math.h
xmemory0
xstring

Example:

code:

std::cout << "\n\n";

compiler:

ios(116): warning C4710: std::string std::_Generic_error_category::message(int) const:

Maybe there are some macroses, some like this?

#define start_warnings
#undef start_warnings
Walter
  • 44,150
  • 20
  • 113
  • 196
manking
  • 396
  • 1
  • 6
  • 21
  • 1
    you should tell us a bit more, like the compiler version and full compile command, the full warning message etc. Yes, there are ways to suppress warnings, but this is usually not a good idea. – Walter Mar 04 '15 at 11:51
  • This may help:http://stackoverflow.com/questions/7159348/disable-single-warning-error – Robertas Mar 04 '15 at 11:52
  • 1
    I *think* OP wants to disable warnings for external headers, which is [possible](https://msdn.microsoft.com/en-us/library/2c8f766e.aspx). – Biffen Mar 04 '15 at 11:52
  • Visual Studio Wall isn't helpful for general development, unlike gcc Wall. Use level 4 – Neil Kirk Mar 04 '15 at 12:07
  • It is possible, but you should not do that. – Basile Starynkevitch Mar 04 '15 at 12:08

1 Answers1

5

In Visual Studio /Wall enables some very obscure warnings. They can be useful, such as locating structures with padding bytes, but in general are overkill and the system headers are not designed to be warning-free at this level. Use /W4 instead.

See #pragma warning if you do need to adjust the level or enable/disable specific warnings.

Mark Tolonen
  • 166,664
  • 26
  • 169
  • 251