-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Can't compile with gcc-7.4.0 #1975
Comments
I'm having the same issue. I can compile with v2.12.2, but not the current master (which I believe is v2.12.4). OS: Ubuntu 20.02 |
I am experiencing the same with Clang 10.0.0:
As an additional note, this is only happening in master. I checked with |
After a short investigation it seems to me that For me it failed using the header-only include, am I correct to assume this is the case for all others affected by this as well? Also, @david8dixon it might be a good idea to change the issue title to something less compiler specific as this is clearly not a GCC related problem. |
Okay, this is fixed. The #1910 contained a partial change to the single-header, which has now been reverted. Y'all really should be using tags for your CI though. |
@horenmar Thank you! In fact I think that most of us are using tags, that's why we know its only broken in master and we have been able to fix our problems by ourselves. We just wanted to notify the project of this problem as this would probably have ended up in a tag sooner or later as well. |
Describe the bug
I am compiling the following test with gcc 7.3.0:
In file included from gcc/7.3.0/include/c++/7.3.0/powerpc64le-unknown-linux-gnu/bits/c++allocator.h:33:0,
from gcc/7.3.0/include/c++/7.3.0/bits/allocator.h:46,
from gcc/7.3.0/include/c++/7.3.0/string:41,
from build/_deps/catch-src/single_include/catch2/catch.hpp:481,
from test.cpp:3:
gcc/7.3.0/include/c++/7.3.0/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Catch::Config; _Args = {Catch::ConfigData&}; _Tp = Catch::Config]’:
gcc/7.3.0/include/c++/7.3.0/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = Catch::Config; _Args = {Catch::ConfigData&}; _Tp = Catch::Config; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocatorCatch::Config]’
gcc/7.3.0/include/c++/7.3.0/bits/shared_ptr_base.h:526:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {Catch::ConfigData&}; _Tp = Catch::Config; _Alloc = std::allocatorCatch::Config; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
/projects/opt/ppc64le/gcc/7.3.0/include/c++/7.3.0/bits/shared_ptr_base.h:637:4: required from ‘std::__shared_count<_Lp>::__shared_count(std::_Sp_make_shared_tag, _Tp*, const _Alloc&, _Args&& ...) [with _Tp = Catch::Config; _Alloc = std::allocatorCatch::Config; _Args = {Catch::ConfigData&}; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
gcc/7.3.0/include/c++/7.3.0/bits/shared_ptr_base.h:1295:35: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocatorCatch::Config; _Args = {Catch::ConfigData&}; _Tp = Catch::Config; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]’
gcc/7.3.0/include/c++/7.3.0/bits/shared_ptr.h:344:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocatorCatch::Config; _Args = {Catch::ConfigData&}; _Tp = Catch::Config]’
gcc/7.3.0/include/c++/7.3.0/bits/shared_ptr.h:690:14: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = Catch::Config; _Alloc = std::allocatorCatch::Config; _Args = {Catch::ConfigData&}]’
gcc/7.3.0/include/c++/7.3.0/bits/shared_ptr.h:706:39: required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = Catch::Config; _Args = {Catch::ConfigData&}]’
build/_deps/catch-src/single_include/catch2/catch.hpp:13403:63: required from here
gcc/7.3.0/include/c++/7.3.0/ext/new_allocator.h:136:4: error: invalid new-expression of abstract class type ‘Catch::Config’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from test.cpp:3:0:
build/_deps/catch-src/single_include/catch2/catch.hpp:5315:11: note: because the following virtual functions are pure within ‘Catch::Config’:
class Config : public IConfig {
^~~~~~
In file included from test.cpp:3:0:
build/_deps/catch-src/single_include/catch2/catch.hpp:4525:24: note: virtual double Catch::IConfig::minDuration() const
virtual double minDuration() const = 0;
Expected behavior
I would expect this code would compile. In fact, it compiled 1-2 weeks ago.
Reproduction steps
See code above
Platform information:
The text was updated successfully, but these errors were encountered: