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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Oh actually we already do the same, but only with -Wall:

foo.cc: In function ‘void f()’:
foo.cc:3:6: error: expected ‘;’ before ‘}’ token
    3 |   { 0 };
      |      ^~
      |      ;
foo.cc:3:5: warning: statement has no effect [-Wunused-value]
    3 |   { 0 };
      |     ^

Reply via email to