small bitmap.c patch
mike at easysw.com
Sat Sep 22 16:31:04 GMT 2001
Simo Sorce wrote:
> It assumes the compiler will use the structure as it is declared,
> but optimization can change this, it can reorder datafor speed or
> memory optimization.
Theoretically, yes, however no compiler I know of actually does
this, since many data structures are used for raw "wire" or "file"
data (i.e. TCP/IP headers, etc.) and any compiler that actually
implemented this would instantly break existing code.
[Personally, I think the re-order addition to the C spec was
not thought out well, and does not even spell out a portable
way for legacy code to retain backwards compatibility, e.g.
with a #pragma or whatever...]
Michael Sweet, Easy Software Products mike at easysw.com
Printing Software for UNIX http://www.easysw.com
More information about the samba-technical