[Xcb] xcb-proto commit f91186b9f3 (dri2 padding) breaks build
Josh Triplett
josh at joshtriplett.org
Mon May 17 16:45:46 PDT 2010
On Mon, May 17, 2010 at 03:49:57PM -0700, Alan Coopersmith wrote:
> I cannot build libxcb when commit f91186b9f3e55e1d478476749c929b86e2865cc8
> is present, but going back to the previous commit allows it to build fine.
>
> With that commit in place, building gives the error:
>
> "dri2.c", line 332: cannot take sizeof void
>
> The code from the generated dri2.c here is:
>
> 328 void *
> 329 xcb_dri2_connect_alignment_pad (const xcb_dri2_connect_reply_t *R /**< */)
> 330 {
> 331 xcb_generic_iterator_t prev = xcb_dri2_connect_driver_name_end(R);
> 332 return (void *) ((char *) prev.data + XCB_TYPE_PAD(void, prev.index)
> + 0);
> 333 }
>
> After cpp expansion the last line has become:
>
> return (void *) ((char *) prev.data + ( - ( prev . index ) & ( sizeof ( void )
> > 4 ? 3 : sizeof ( void ) - 1 ) ) + 0);
>
> and like the compiler, I have no idea what size a "void" is.
>
> Is something wrong in the code generator that's generating different code here
> for me, or does gcc allow taking the size of sizeless types like void?
>
> (I'm building on OpenSolaris with the Sun compilers.)
Not a bug in the code generator, but a bug in the descriptions for using
type void, I think. <list type="void" ...> seems inherently wrong.
Odd that you can build XCB before that commit, though, since a few other
lists of type void seem to exist as well.
- Josh Triplett
More information about the Xcb
mailing list