[Xcb] [Bug 23403] compiler padding causes reply parsing to use incorrect offsets

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Dec 17 07:19:21 PST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=23403

--- Comment #6 from Daniel Martin <consume.noise at gmail.com> ---
(In reply to comment #4)
> I don't think it makes sense to leave protocol structs incorrectly padded
> and manually compute their real size, ignoring the compiler.  While using
> something like __attribute__((packed)) doesn't work portably across
> compilers, assuming that the padding only occurs at the *end* of the
> structure (and not, for instance, right before the last field) doesn't work
> portably either.

I think adding the packed attribute and thereby possibly breaking it for other
compilers is a minor issue then leaving it broken for all (mainly gcc).

But, I don't have any experience with other compilers. What do they do if they
find an unsupported attribute (warning, error, ignore it silently)?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20121217/c0d7e44a/attachment.html>


More information about the Xcb mailing list