[libdvdnav-devel] By The Way...

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Fri Jan 16 04:01:38 CET 2015

...just for fun, I tried building libdvdread with “CC=clang”. It
generated a whole lot of “warning: unknown attribute 'gcc_struct'
ignored [-Wunknown-attributes]”, but otherwise actually compiled and
linked! (I didn’t try actually installing and using it...)

Looking at the sources of these warnings, there are a whole lot of
packed structs with bitfields in them (using the ATTRIBUTE_PACKED
macro). I don’t think such structs are portable across big/little
endian, let alone across C compilers.

The only portable way to do bitfields in C is to use shifting and

More information about the libdvdnav-devel mailing list