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

Fixing non valid preprocessor warning on msvc #124

Merged
merged 1 commit into from
Oct 25, 2016

Conversation

aallrd
Copy link
Contributor

@aallrd aallrd commented Oct 20, 2016

The #warning keyword is not understood by the msvc preprocessor, throwing the below fatal error:
fatal error C1021: invalid preprocessor command 'warning'
This fix provides msvc portability for the preprocessor warning message.

Copy link
Member

@paoloambrosio paoloambrosio left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

Can you keep the same 4 spaces indentation as it is in the rest of the code (and below on the same file) and squash the two commits?

@@ -1,4 +1,8 @@
#warning Use of defs.hpp is deprecated, please use either autodetect.hpp or generic.hpp
#ifdef __GNUC__
#warning "Use of defs.hpp is deprecated, please use either autodetect.hpp or generic.hpp"
Copy link
Member

Choose a reason for hiding this comment

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

Indent the #warning that is inside the if block

#ifdef __GNUC__
#warning "Use of defs.hpp is deprecated, please use either autodetect.hpp or generic.hpp"
#else
#pragma message( "Use of defs.hpp is deprecated, please use either autodetect.hpp or generic.hpp" )
Copy link
Member

Choose a reason for hiding this comment

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

Indent the #pragma that is inside the else block

@aallrd aallrd force-pushed the preprocessor-warning-fix branch from 6c83029 to 3abd374 Compare October 25, 2016 11:56
@aallrd
Copy link
Contributor Author

aallrd commented Oct 25, 2016

I updated my change with a 4 spaces indentation.

paoloambrosio added a commit to paoloambrosio/cucumber-cpp that referenced this pull request Oct 25, 2016
@paoloambrosio paoloambrosio merged commit 3abd374 into cucumber:master Oct 25, 2016
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

Successfully merging this pull request may close these issues.

2 participants