[Bug c++/89299] __attribute__ cleanup does not accept template function

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299 --- Comment #7 from Andrew Pinski --- The issue is we don't do any overload resolution for the function in cleanup attribute; most likely because the attribute was originally added for C. Also in C++ you could just use a wrapper class to do the

[Bug c++/89299] __attribute__ cleanup does not accept template function

2019-02-13 Thread paradox_ptr at protonmail dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299 --- Comment #6 from paradox_ptr at protonmail dot ch --- (In reply to Martin Sebor from comment #4) > I'm curious about the use case: can you describe what you are using > the attribute for in C++? I don't have a meaningful use case for you. Was

[Bug c++/89299] __attribute__ cleanup does not accept template function

2019-02-12 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299 --- Comment #5 from Jonathan Wakely --- For now I suggest this patch for the docs: --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -6815,6 +6815,11 @@ does not allow the exception to be caught, only to perform an action. It is undefined

[Bug c++/89299] __attribute__ cleanup does not accept template function

2019-02-12 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #4

[Bug c++/89299] __attribute__ cleanup does not accept template function

2019-02-12 Thread paradox_ptr at protonmail dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299 --- Comment #3 from paradox_ptr at protonmail dot ch --- > Well you didn't instantiate it. 'cu' is not a function, it's a template. Sure. There is not enough information for the compiler to deduce the type without <>. > IMHO it's completely unne

[Bug c++/89299] __attribute__ cleanup does not accept template function

2019-02-12 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/89299] __attribute__ cleanup does not accept template function

2019-02-12 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299 --- Comment #1 from Jonathan Wakely --- That attribute doesn't really make sense in C++, because you have destructors anyway, so I would think that making it work with C++ templates is very low priority.