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

C++ 20 support #10

Open
s9105947 opened this issue Jul 25, 2022 · 0 comments
Open

C++ 20 support #10

s9105947 opened this issue Jul 25, 2022 · 0 comments

Comments

@s9105947
Copy link

Description

Compiling with C++20 issues (unexpected) warnings.

Steps to reproduce

Include scorep_plugin_cxx_wrapper header in a C++20 project

Expected Behavior

successful compilation, no warnings issued

Actual Behavior

compilation is successful,
but these warnings are issued (by g++):

In file included from scorep_plugin_topdown/lib/scorep_plugin_cxx_wrapper/include/scorep/plugin/plugin.hpp:33,
                 from scorep_plugin_topdown/include/plugin.hpp:9,
                 from scorep_plugin_topdown/src/plugin.cpp:1:
scorep_plugin_topdown/lib/scorep_plugin_cxx_wrapper/include/scorep/plugin/base.hpp: In static member function ‘static SCOREP_Metric_Plugin_Info scorep::plugin::base<Child, Args>::get_info()’:
scorep_plugin_topdown/lib/scorep_plugin_cxx_wrapper/include/scorep/plugin/base.hpp:342:13: warning: ‘++’ expression of ‘volatile’-qualified type is deprecated [-Wvolatile]
  342 |             tls_dummy++;
      |             ^~~~~~~~~
scorep_plugin_topdown/lib/scorep_plugin_cxx_wrapper/include/scorep/plugin/base.hpp: In instantiation of ‘static SCOREP_Metric_Plugin_Info scorep::plugin::base<Child, Args>::get_info() [with Child
= topdown_plugin; Args = {scorep::plugin::policy::sync, scorep::plugin::policy::per_thread, scorep::plugin::policy::scorep_clock, tmam_metric_t_policy}; SCOREP_Metric_Plugin_Info = SCOREP_Metric_Plugin_Info]’:
scorep_plugin_topdown/src/plugin.cpp:3:1:   required from here
scorep_plugin_topdown/lib/scorep_plugin_cxx_wrapper/include/scorep/plugin/base.hpp:342:13: warning: ‘++’ expression of ‘volatile’-qualified type is deprecated [-Wvolatile]

Notes

Can be circumvented by silencing these warnings:

#pragma GCC diagnostic push 
#pragma GCC diagnostic ignored "-Wvolatile"
#include <scorep/plugin/plugin.hpp>
#pragma GCC diagnostic pop
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

No branches or pull requests

1 participant