Re: [PATCH 0/3] Add offsetofp() and offsetofendp() for pointer arithmetic

From: Christoph Hellwig

Date: Fri Nov 06 2026 - 03:06:55 EST


On Thu, Nov 05, 2026 at 06:16:15PM +0100, Bence Csokas wrote:
> A common usage pattern for offsetof() is the following:
>
> offsetof(typeof(*ptr), member)
>
> Condense this operation to one macro for a more maintainable code base.

What exactly makes non-standard macros with no obvious safety benefit
more maintainable?