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

GCC 9 warnings #2670

Open
kodebach opened this issue May 5, 2019 · 3 comments

Comments

@kodebach
Copy link
Contributor

commented May 5, 2019

GCC 9 (gcc (GCC) 9.0.1 20190312 (Red Hat 9.0.1-0.10) on Fedora 30) produces the following warnings when building Elektra.

libelektra/src/bindings/cpp/tests/testcpp_contextual_policy.cpp: In member function ‘virtual void test_contextual_policy_staticGetPolicy_Test::TestBody()’:
libelektra/src/bindings/cpp/tests/testcpp_contextual_policy.cpp:42:62: warning: implicitly-declared ‘kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyStaticGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>::Value(const kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyStaticGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>&)’ is deprecated [-Wdeprecated-copy]
   42 |  ContextualValue<int, GetPolicyIs<MyStaticGetPolicy>> cv2 (cv);
      |                                                              ^
In file included from libelektra/src/bindings/cpp/include/kdbcontext.hpp:15,
                 from libelektra/src/bindings/cpp/tests/testcpp_contextual_policy.cpp:9:
libelektra/src/bindings/cpp/include/kdbvalue.hpp:513:6: note: because ‘kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyStaticGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>’ has user-provided ‘kdb::Value<T, PolicySetter1, PolicySetter2, PolicySetter3, PolicySetter4, PolicySetter5, PolicySetter6>::V& kdb::Value<T, PolicySetter1, PolicySetter2, PolicySetter3, PolicySetter4, PolicySetter5, PolicySetter6>::operator=(const V&) [with T = int; PolicySetter1 = kdb::ContextPolicyIs<kdb::Context>; PolicySetter2 = kdb::GetPolicyIs<MyStaticGetPolicy>; PolicySetter3 = kdb::DefaultPolicyArgs; PolicySetter4 = kdb::DefaultPolicyArgs; PolicySetter5 = kdb::DefaultPolicyArgs; PolicySetter6 = kdb::DefaultPolicyArgs; kdb::Value<T, PolicySetter1, PolicySetter2, PolicySetter3, PolicySetter4, PolicySetter5, PolicySetter6>::V = kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyStaticGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>]’
  513 |  V & operator= (V const & rhs)
      |      ^~~~~~~~
libelektra/src/bindings/cpp/tests/testcpp_contextual_policy.cpp: In member function ‘virtual void test_contextual_policy_dynamicGetPolicy_Test::TestBody()’:
libelektra/src/bindings/cpp/tests/testcpp_contextual_policy.cpp:172:63: warning: implicitly-declared ‘kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyDynamicGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>::Value(const kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyDynamicGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>&)’ is deprecated [-Wdeprecated-copy]
  172 |  ContextualValue<int, GetPolicyIs<MyDynamicGetPolicy>> cv2 (cv);
      |                                                               ^
In file included from libelektra/src/bindings/cpp/include/kdbcontext.hpp:15,
                 from libelektra/src/bindings/cpp/tests/testcpp_contextual_policy.cpp:9:
libelektra/src/bindings/cpp/include/kdbvalue.hpp:513:6: note: because ‘kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyDynamicGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>’ has user-provided ‘kdb::Value<T, PolicySetter1, PolicySetter2, PolicySetter3, PolicySetter4, PolicySetter5, PolicySetter6>::V& kdb::Value<T, PolicySetter1, PolicySetter2, PolicySetter3, PolicySetter4, PolicySetter5, PolicySetter6>::operator=(const V&) [with T = int; PolicySetter1 = kdb::ContextPolicyIs<kdb::Context>; PolicySetter2 = kdb::GetPolicyIs<MyDynamicGetPolicy>; PolicySetter3 = kdb::DefaultPolicyArgs; PolicySetter4 = kdb::DefaultPolicyArgs; PolicySetter5 = kdb::DefaultPolicyArgs; PolicySetter6 = kdb::DefaultPolicyArgs; kdb::Value<T, PolicySetter1, PolicySetter2, PolicySetter3, PolicySetter4, PolicySetter5, PolicySetter6>::V = kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyDynamicGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>]’
  513 |  V & operator= (V const & rhs)
      |      ^~~~~~~~
libelektra/src/bindings/cpp/tests/testcpp_contextual_policy.cpp: In member function ‘virtual void test_contextual_policy_root_Test::TestBody()’:
libelektra/src/bindings/cpp/tests/testcpp_contextual_policy.cpp:210:63: warning: implicitly-declared ‘kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyDynamicGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>::Value(const kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyDynamicGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>&)’ is deprecated [-Wdeprecated-copy]
  210 |  ContextualValue<int, GetPolicyIs<MyDynamicGetPolicy>> cv2 (cv);
      |                                                               ^
In file included from libelektra/src/bindings/cpp/include/kdbcontext.hpp:15,
                 from libelektra/src/bindings/cpp/tests/testcpp_contextual_policy.cpp:9:
libelektra/src/bindings/cpp/include/kdbvalue.hpp:513:6: note: because ‘kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyDynamicGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>’ has user-provided ‘kdb::Value<T, PolicySetter1, PolicySetter2, PolicySetter3, PolicySetter4, PolicySetter5, PolicySetter6>::V& kdb::Value<T, PolicySetter1, PolicySetter2, PolicySetter3, PolicySetter4, PolicySetter5, PolicySetter6>::operator=(const V&) [with T = int; PolicySetter1 = kdb::ContextPolicyIs<kdb::Context>; PolicySetter2 = kdb::GetPolicyIs<MyDynamicGetPolicy>; PolicySetter3 = kdb::DefaultPolicyArgs; PolicySetter4 = kdb::DefaultPolicyArgs; PolicySetter5 = kdb::DefaultPolicyArgs; PolicySetter6 = kdb::DefaultPolicyArgs; kdb::Value<T, PolicySetter1, PolicySetter2, PolicySetter3, PolicySetter4, PolicySetter5, PolicySetter6>::V = kdb::Value<int, kdb::ContextPolicyIs<kdb::Context>, kdb::GetPolicyIs<MyDynamicGetPolicy>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>]’
  513 |  V & operator= (V const & rhs)
      |      ^~~~~~~~

(paths shortened to relevant part for readability)

@markus2330

This comment has been minimized.

Copy link
Contributor

commented May 5, 2019

Thank you for trying out the latest GCC!

@sanssecours

This comment has been minimized.

Copy link
Member

commented May 8, 2019

Those warnings are now also problem for our Travis build job 🍏 GCC. Currently I am working on a temporary and a more permanent fix.

@kodebach

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2019

Those warnings are now also problem for our Travis build job 🍏 GCC.

We should really be using brew install gcc@8 instead of brew install gcc to use a fixed compiler version like we do for Linux builds. (The same is true for llvm/clang).

sanssecours added a commit to sanssecours/elektra that referenced this issue May 8, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue May 8, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue May 8, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue May 8, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue May 8, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue May 8, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue May 9, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue May 9, 2019
@kodebach kodebach referenced this issue May 9, 2019
4 of 9 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.