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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
clang rejects/warnings similar to gcc:
<source>:2:8: error: an attribute list cannot appear here
extern [[nodiscard]] int f (void);
       ^~~~~~~~~~~~~
<source>:3:14: error: 'nodiscard' attribute cannot be applied to types
extern int [[nodiscard]] g (void);
             ^
<source>:4:7: error: 'nodiscard' attribute cannot be applied to types
int [[nodiscard]] h (void);
      ^

Reply via email to