On 3/29/23 1:59 PM, Linus Torvalds wrote: > On Wed, Mar 29, 2023 at 12:56 PM Jens Axboe <axboe@xxxxxxxxx> wrote: >> >> Nope, still fails with it moved below. > > Ouch. I guess the 'const' cast may be the only way then. It sounds > like gcc may warn whenever it sees an assignment to any structure that > has a const member, rather than when it sees an assignment to that > particular member. > > Sad. Yeah, I tried a bunch of variants to trick it, including having it in a union with another non-const iovec first. But it cannot be tricked, so I think we're stuck with that. I'll add a comment. -- Jens Axboe