Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings raised to error with latest MSVC version #107

Closed
sitic opened this issue Dec 9, 2017 · 2 comments
Closed

Warnings raised to error with latest MSVC version #107

sitic opened this issue Dec 9, 2017 · 2 comments

Comments

@sitic
Copy link

sitic commented Dec 9, 2017

Visual Studio 2017 version 15.5 was released on December 4th and includes MSVC version 14.12. With it, there are new warnings which are raised to errors:

ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /I"D:\Downloads\doctest-master\examples\all_features\..\.
  .\doctest" /Zi /nologo /Wall /WX /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D DOCTEST_CONFIG_COLORS_NONE /D DOCTEST_CONFIG_NO_POSIX_SIGNALS /D DOCTEST_CONFIG_NO_WINDOWS_SEH /D "C
  MAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++latest /Fo"all_features.dir\Debug\\" /Fd"all_features.dir\Debug\vc141
  .pdb" /Gd /TP /wd4514 /wd4571 /wd4710 /wd4711 /wd4616 /wd4619 /errorReport:queue  /permissive- "D:\Downloads\doctest-master\examples\all_features\main.cpp"
  main.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winbase.h(7356): error C2220: warning treated as error - no 'object' file generated [D:\Downloads\doctest-maste
r\build\examples\all_features\all_features.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winbase.h(7356): warning C5039: 'TpSetCallbackCleanupGroup': pointer or reference to potentially throwing function passed to e
xtern C function under -EHc. Undefined behavior may occur if this function throws an exception. [D:\Downloads\doctest-master\build\examples\all_features\all_features.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winbase.h(7356): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler wit
  h which you used to build without warnings
D:\Downloads\doctest-master\doctest\doctest.h(5471): warning C5039: 'qsort': pointer or reference to potentially throwing function passed to extern C function under -EHc. Und
efined behavior may occur if this function throws an exception. [D:\Downloads\doctest-master\build\examples\all_features\all_features.vcxproj]
  D:\Downloads\doctest-master\doctest\doctest.h(5471): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you
  used to build without warnings
D:\Downloads\doctest-master\doctest\doctest.h(5473): warning C5039: 'qsort': pointer or reference to potentially throwing function passed to extern C function under -EHc. Und
efined behavior may occur if this function throws an exception. [D:\Downloads\doctest-master\build\examples\all_features\all_features.vcxproj]
  D:\Downloads\doctest-master\doctest\doctest.h(5473): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you
  used to build without warnings
D:\Downloads\doctest-master\doctest\doctest.h(5475): warning C5039: 'qsort': pointer or reference to potentially throwing function passed to extern C function under -EHc. Und
efined behavior may occur if this function throws an exception. [D:\Downloads\doctest-master\build\examples\all_features\all_features.vcxproj]
  D:\Downloads\doctest-master\doctest\doctest.h(5475): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you
  used to build without warnings

Extra information

  • doctest version: latest master
  • Operating System: Windows 10
  • Compiler+version: Visual Studio 2017 version 15.5
@onqtam
Copy link
Member

onqtam commented Dec 11, 2017

I silenced the C5039 warnings, but that is committed only in the dev branch for now...

I also encountered an error in the windows headers after updating to the latest version ot VS - there must be some regression/problem on their side when the /permissive- (and possibly /std:c++latest) flag is given - I had to also give /Zc:twoPhase- (use old behavior of MSVC compiler for two-phase lookup) to not get that error from the windows headers - I hope they fix it in an upcoming release...

@onqtam
Copy link
Member

onqtam commented Feb 6, 2018

solved - will push soon to master

@onqtam onqtam closed this as completed Feb 6, 2018
@onqtam onqtam changed the title Warnings raised to error with lastest MSVC version Warnings raised to error with latest MSVC version Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants