#pragma warning(push, 0) can't disable /Wall warning on Visual Studio 2017

  • Thread starter Thread starter aokomoriuta
  • Start date Start date
A

aokomoriuta

Guest
Hi, all.

I found a problem that seems a compiler bug but I can't make sure.



Step to reproduce:

  1. Create new empty project on Visual Studio 2017 Ver 15.2 (26430.6)
  2. Set /Wall
  3. Add new empy source file
  4. copy & paste below code.

#pragma warning (push, 0)
#include <iostream>
#pragma warning (pop)

int main()
{
return 0;
}

Actual behaivor: There are many many warnings (e.g. C4365, 4820, 4626, 5027...etc) in system header (e.g. xmemory0, xlocale, system_error...etc).

Expected behaivor: All warnings are suppressed by "#pragma warning (push, 0)"


Note that this problem can't be reproduced on Visual Studio 2015 Ver 14.0.23107.0 D14REL.


Could you give me some your opinions or point me a my fault?

Continue reading...
 

Similar threads

Back
Top