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

Catch2 does not compile on Solaris. #1722

Closed
jealas opened this issue Aug 9, 2019 · 0 comments · Fixed by #1723
Closed

Catch2 does not compile on Solaris. #1722

jealas opened this issue Aug 9, 2019 · 0 comments · Fixed by #1723

Comments

@jealas
Copy link
Contributor

jealas commented Aug 9, 2019

Current master does not compile on Solaris due to a name conflict with a #define in the <sys/regset.h> header.

I was able to reproduce this bug in an isolated directory containing a main.cpp (below) and the single_include/catch2/catch.hpp header from commit e2d863b. This is the simple main.cpp file that doesn't compile:

#include "catch.hpp"
int main() {}

Compilation command: g++ -std=c++11 -I. main.cpp

This bug originated in commit 004228e where the template parameter name "SS" was used. The conflicting define in the Solaris <sys/regset.h> header is this:

#define SS              18      /* only stored on a privilege transition */

Naturally, g++ errors out when it encounters a numeric constant instead of a template parameter name:

catch.hpp:1542:31: error: expected nested-name-specifier before **numeric constant**
template<typename SS, typename TT>
                   ^

Platform Info:
OS: Solaris 11.4.0.15.0 i386
Compiler: GCC 7.3.0
Catch Version: e2d863b

A PR will be created to fix this issue.

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 a pull request may close this issue.

1 participant