[Bug c++/108238] auto return type and some attributes don't get along

2023-10-20 Thread pobrn at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108238 --- Comment #5 from Barnabás Pőcze --- Based on a suggestion from Jakub Jelínek, I have tried to modify `is_late_template_attribute()` instead, but it appears that function does not run in this case.

[Bug c++/108238] auto return type and some attributes don't get along

2023-10-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108238 --- Comment #4 from Andrew Pinski --- Here is one which is a little more complex for templated function too: ``` template [[gnu::returns_nonnull]] auto f() { return new T(42); } auto g(void) { return f(); } ```