Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



Mindaugas Rasiukevicius wrote:
> +     pcq = kmem_zalloc(offsetof(pcq_t, pcq_items[nitems]), kmflags);

I'm not sure that this is a valid use of offsetof. C99 (7.17/3) defines
it as

        offsetof(type, member-designator)

I don't see a definition of member-designator, but the designator is
defined as

        designator:
                [ constant-expression ]
                . identifier

nitems in pcq_items[nitems] is not a constant expression.

Alex


Home | Main Index | Thread Index | Old Index