Catch2 icon indicating copy to clipboard operation
Catch2 copied to clipboard

Unknown #pragma warning '4800'

Open krofik opened this issue 4 years ago • 2 comments

Describe the bug With the warning /w14619 enabled I am getting # pragma warning: there is no warning number '4800' on the line 2192 which says: #pragma warning(disable:4800) // Forcing result to true or false

Expected behavior There should be no warning shown.

Reproduction steps Compile any example with on VS 2017 with the warning /w14619 set.

Platform information:

  • OS: Windows 10
  • Compiler+version: MSVC 19.16.27045.0 (VS 2017)
  • Catch version: v2.13.4

Additional context On MSVC 19.27.29112.0 (VS 2019) this warning does not appear anymore.

krofik avatar Jan 24 '21 21:01 krofik

Can you link to documentation for /w14619? I can't seem to find it / don't know what to search for to find it.

Out of curiosity, is this something you could fix with /wd4068 (warning disable: unknown pragma)?

david-fong avatar Aug 03 '22 08:08 david-fong

The /w argument is of the form /wnNNNN, where n is the warning level you want to change the warning to and NNNN is the warning number.

C4619 (#pragma warning: there is no warning number 'number')

The documentation for C4800 (here) says that it is not emitted by Visual Studio 2017. Seems to me that they removed the original warning and then added one back in VS2019 with the same number.

andrewauclair avatar Nov 24 '22 16:11 andrewauclair