Hi,
On 5/12/21 6:47 AM, keruspe+ml01(a)gmail.com wrote:
Hello,
Since the introduction of the _auto_ destructor macros, ell and iwd generate nested
functions, which are a gnu extension not supported by clang.
While adding support for that in clang would also benefit other projects, I don't
think this idea is going anywhere as it has been brought up numerous times in the past and
never went forward.
We're aware of this. We'll take a look at this in the next few releases.
The way e.g. glib deals with it is by splitting this in two, first define the destructor
function alonside the struct it is going to destruct, then hook it up with a macro like
_auto_ here, this way no nested functions are needed. Would this make sense for ell/iwd
too? I can provide patches if required.
Yes, we considered that. However, at first glance this seemed less than ideal
since our headers are not set up to make this approach very easy. Using gcc's
nested function syntax made for a much more compact and less invasive change.
Maybe we missed something. Feel free to take a stab at fixing this, patches are
always welcome.
Regards,
-Denis