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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.2.0, 11.0, 4.7.0, 4.8.4,
                   |                            |4.9.4, 5.5.0, 6.4.0, 7.2.0,
                   |                            |8.3.0, 9.1.0
           Keywords|                            |diagnostic

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
This never worked correctly so it's not a regression.

Clang does the right thing and warns where expected:

z.c:20:3: warning: ignoring return value of function declared with
      'warn_unused_result' attribute [-Wunused-result]
  fwur ();   // -Wunused-result (good)
  ^~~~
z.c:27:3: warning: ignoring return value of function declared with
      'warn_unused_result' attribute [-Wunused-result]
  fwur ();   // missing -Wunused-result (bug)
  ^~~~
2 warnings generated.

Reply via email to