You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When HPX is configured with APEX, the APEX source files all give this warning when compiled (for example):
[ 68%] Building CXX object apex/src/apex/CMakeFiles/apex.dir/otf2_listener.cpp.o
In file included from /scratch/khuck/hpx/build/libs/core/threading_base/include/hpx/modules/threading_base.hpp:14:0,
from /scratch/khuck/hpx/src/libs/core/synchronization/include/hpx/synchronization/mutex.hpp:14,
from /scratch/khuck/hpx/src/libs/core/synchronization/include/hpx/synchronization/condition_variable.hpp:16,
from /scratch/khuck/hpx/src/libs/parallelism/futures/include/hpx/futures/detail/future_data.hpp:20,
from /scratch/khuck/hpx/src/libs/parallelism/async_combinators/include/hpx/async_combinators/wait_all.hpp:108,
from /scratch/khuck/hpx/src/libs/parallelism/execution/include/hpx/execution/executors/execution.hpp:17,
from /scratch/khuck/hpx/src/libs/parallelism/executors/include/hpx/executors/execution_policy.hpp:14,
from /scratch/khuck/hpx/src/libs/parallelism/algorithms/include/hpx/parallel/algorithms/adjacent_find.hpp:124,
from /scratch/khuck/hpx/src/libs/parallelism/algorithms/include/hpx/parallel/algorithm.hpp:17,
from /scratch/khuck/hpx/src/libs/full/include_local/include/hpx/local/algorithm.hpp:10,
from /scratch/khuck/hpx/src/libs/full/include/include/hpx/algorithm.hpp:9,
from /scratch/khuck/hpx/src/libs/full/include/include/hpx/hpx.hpp:10,
from /scratch/khuck/hpx/build/_deps/apex-src/src/apex/otf2_listener.cpp:11:
/scratch/khuck/hpx/src/libs/core/threading_base/include/hpx/threading_base/annotated_function.hpp:72:26: warning: ‘warn_unused_result’ attribute only applies to function types [-Wattributes]
struct HPX_NODISCARD annotate_function
^~~~~~~~~~~~~~~~~
Steps to Reproduce the Problem
configure HPX with -DHPX_WITH_APEX=TRUE
make core
Specifications
HPX Version: current master
Platform (compiler, OS): all platforms, gcc compiler
The text was updated successfully, but these errors were encountered:
@khuck I believe this is "fixed" after #5283 was merged.
What happened was that HPX_NODISCARD mapped to [[nodiscard]] if the attribute is available, and to __attribute__((warn_unused_result)) on GCC if [[nodiscard]] isn't available. The former applies to structs, classes, and functions, whereas the latter only applies to functions. However, we used HPX_NODISCARD assuming it can be used everywhere. After #5283 we assume [[nodiscard]] is always available since we require C++17. #5283 was merged yesterday. Would you mind trying again with latest master?
Expected Behavior
compilation without warnings
Actual Behavior
When HPX is configured with APEX, the APEX source files all give this warning when compiled (for example):
Steps to Reproduce the Problem
-DHPX_WITH_APEX=TRUE
Specifications
The text was updated successfully, but these errors were encountered: