https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

--- Comment #70 from Andrew Church <achurch+gcc at achurch dot org> ---
(In reply to Jonathan Wakely from comment #69)
> Maybe you want:
> 
>      [[maybe_unused]] auto _ = foo();

If I could apply that attribute to the value itself, i.e.:

    [[maybe_unused]] foo();

that would do what I want.  Since it only applies to a declaration, we're still
left with idiosyncratic code ("auto _ =" instead of "(void)") which ideally
should not be needed.

Reply via email to