[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

[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 <

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

2019-02-12 Thread paradox_ptr at protonmail dot ch
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: paradox_ptr at protonmail dot ch Target Milestone: --- #include template void cu( T** p ) { if ( p && *p ) { free( *p ); } } void cu_char( char** s ) { if ( s &&