News for hackers. Stuff that matters.
Re:Proposal: expression to create pointer to simple types by fanf2 on Monday April 19, 2021 @11:58AM (#26864233)
Yes, if f() returns the type T then you can write

    &(T[]){ f() }
The type in brackets needs to be an array so that if f() returns a struct then the initializer list has the right shape. If T is a simple type then you can drop the [].

There are no comments on this comment yet.