* Alejandro Colomar via Gcc:

> If there's no way, it would be interesting to add compound literals of
> function type to achieve this:
>
>       #define strnulD(...)                                          \
>       ((static inline auto                                          \
>         (auto s))                                                   \
>       {                                                             \
>               return s + strlen(s);                                 \
>       }(__VA_ARGS__))

This already works:

static inline auto
strnulD (auto s)
{
  return s + strlen (s);
}

No need to invent new syntax for it.

Thanks,
Florian

Reply via email to