[Xcb] [PATCH v2] c_client.py: avoid field name clash with C++ 'explicit' keyword

Klemens Baum klemensbaum at gmail.com
Mon Dec 28 17:10:22 PST 2015


On Mon, Dec 28, 2015 at 9:09 PM, Ran Benita <ran234 at gmail.com> wrote:
> I'm not sure if XCB is willing to use C11 already. Though I think gcc
> supports anonymous unions for a long time.
I didn't think of that, since C++ has had anonymous unions from the beginning.
It seems that both gcc and clang allow anonymous union in pre-C11 code
for "compatibility with other compilers." (see
https://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html)

> Note that qt already works around the issue:
> https://github.com/qtproject/qtbase/blob/e979f8721731bc5f4cd0d65830548f9e70da2da5/src/plugins/platforms/xcb/qxcbconnection.h#L51
They don't actually use the explicit field though, so their build will
be unaffected by this change.


More information about the Xcb mailing list