removing -Wused-but-marked-unused

When -Wused-but-marked-unused was added 10 (!) years ago, John pointed out that this breaks idiomatic usage of attribute((unused)). It did then, and it still does today; searching for mentions of this flag reveals that by and large the only time people mention it is to turn it off or complain about it.

At the time it was added, John also implicitly asked why anyone would ever want this warning, and that question went unanswered at the time. So I’m going to ask it again: does anyone want this warning (even though it breaks the documented intent (note: “possibly unused”) of attribute((unused)) for -Werror builds) – and if so, why?

If we can’t establish a rationale for this warning existing, I suggest we remove it.

Thoughts?

I think it can be useful in combination with -Wno-error to check for
left-overs from old asserts. E.g. it is a common idiom to mark variables
with used if they are only referenced in asserts, so it would be nice to
still have a way to find extras.

Joerg