Skip to content

Silence #if/#elif warnings originating from Windows header files #2455

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

Merged
merged 1 commit into from
Sep 18, 2018

Conversation

tautschnig
Copy link
Collaborator

No description provided.

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR failed Diffblue compatibility checks (cbmc commit: 6cb461c).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/77212176
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • the cbmc commit has disappeared in the mean time (e.g. in a force-push)
  • the author is not in the list of contributors (e.g. first-time contributors).

Copy link
Contributor

@smowton smowton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm obviously surprised if windows.h triggers warnings on a Microsoft compiler, but if it's really the case then this seems like an acceptable way to deal with that. Could you provide a specific example of the kind of construct that it's complaining about in your commit message?

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed Diffblue compatibility checks (cbmc commit: 9947bfb).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/78383405

@tautschnig
Copy link
Collaborator Author

I have amended the commit message as suggested.

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed Diffblue compatibility checks (cbmc commit: e3c035d).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/78385938

@smowton
Copy link
Contributor

smowton commented Jul 9, 2018

Thanks! Also whenever we eventually bump required MSVC to 2017, we can use this: https://blogs.msdn.microsoft.com/vcblog/2017/12/13/broken-warnings-theory/

On AppVeyor, we got the following warnings:

C:\Program Files (x86)\Windows Kits\8.1\include\um\processthreadsapi.h(1170) : warning C4668: '_WIN32_WINNT_WINTHRESHOLD' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
C:\Program Files (x86)\Windows Kits\8.1\include\um\winbase.h(8618) : warning C4668: 'NTDDI_WIN7SP1' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
@kroening
Copy link
Member

Sad, but I don't have a better idea.

@kroening kroening merged commit 8ae026b into diffblue:develop Sep 18, 2018
@tautschnig tautschnig deleted the vs-win-headers branch September 18, 2018 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants