News for hackers. Stuff that matters.
Re:The C++ standard for the F-35 Fighter Jet [video] by account42 on Tuesday December 09, 2025 @05:25AM (#46203376)
a) __attribute__((warn_unused_result)) is non-standard in the first place, are you looking for [[nodiscard]] - GCC does not warn on cast to void with that?

b) A return value that is explicitly marked like this is very different from an unused variable that gp suggested the cast to void idiom for. GCC does not warn on variables that are unused except for a cast to void.

There are no comments on this comment yet.