httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: svn commit: r1034916 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h modules/proxy/mod_proxy.c modules/proxy/mod_proxy.h modules/proxy/proxy_util.c
Date Tue, 16 Nov 2010 00:35:01 GMT
On Mon, 15 Nov 2010 13:46:45 -0500
Jim Jagielski <jim@jaguNET.com> wrote:

> For the record, this is another reason why I don't like
> "optimizing" struct layouts and using bitfields, since you
> can no longer simply add additional elements to the end and
> allow for *some* compatibility... :/
> 
Well, you *could*.  You'd just (probably) sacrifice the optimisation.
Much the same story as a bunch of chars.

FWIW, if I'd been designing the above from scratch, those flags
would be a bitfield and a set of #defines, thus occupying a
fixed/known width in the struct.  Compared to that, using :1
just enables the compiler to optimise to an indeterminate size
according to its alignment rules.

-- 
Nick Kew

Mime
View raw message