Re: [PATCH] c++: Fix C++11 attribute propagation [PR106712]

2022-08-29 Thread Jason Merrill via Gcc-patches
On 8/26/22 19:01, Marek Polacek wrote: When we have [[noreturn]] int fn1 [[nodiscard]](), fn2(); "noreturn" should apply to both fn1 and fn2 but "nodiscard" only to fn1: [dcl.pre]/3: "The attribute-specifier-seq appertains to each of the entities declared by the declarators of the init-decla

[PATCH] c++: Fix C++11 attribute propagation [PR106712]

2022-08-26 Thread Marek Polacek via Gcc-patches
When we have [[noreturn]] int fn1 [[nodiscard]](), fn2(); "noreturn" should apply to both fn1 and fn2 but "nodiscard" only to fn1: [dcl.pre]/3: "The attribute-specifier-seq appertains to each of the entities declared by the declarators of the init-declarator-list." [dcl.spec.general]: "The attr