-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
HPX does not compile with G++ version prior to 9.3. #6240
Comments
We can make this attribute conditional, though. |
Do we look into replacing maybe_unused with a #define, possibly something like HPX_UNUSED which falls back to attribute((unused)) for older GCC versions? |
We do have
one would have to write:
We should make those changes only singular places when necessary, though. |
So everywhere we use [[maybe_unused]] should be replaced with HPX_UNUSED or we could have another #define for [[maybe_unused]] which falls back to __attribute((unused)) Any comments on what you believe is better? |
No! Everywhere possible where we currently use
How many spots would that be used in? If it's just a handful, I think it's not worth the trouble. |
Expected Behavior
Compile successfully for any compilers supporting c++17.
Actual Behavior
G++ 8.5 gave me an error
error: expected unqualified-id before '[' token
Steps to Reproduce the Problem
Just compile it with G++ 8.5.
Specifications
ad3ac76e159692355d4715f8b275c0a062b859af
Comment
This is not a fault of HPX, but G++, but this ticket can at least serve as an explanation for future users encountering this error. This is caused by a bug in G++ prior to 9.3. G++ doesn't parse correctly the
[[maybe_unused]]
attribute for the constructor's first argument. However, HPX uses it inlibs/core/executors/include/hpx/executors/service_executors.hpp
line 49.Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81429.
The text was updated successfully, but these errors were encountered: