Re: bitfields

Paul Sokolovsky


On Mon, 28 Aug 2017 12:42:50 -0700
Andy Ross <andrew.j.ross@...> wrote:


I wouldn't view this as a critical danger for an single-arch-specific
driver that will only ever be built by gcc, but for anything with
portability needs beyond that we should probably be writing proper C.
Well, in the parallel thread we discuss converting from Kbuild to
CMake, partly because people want to use various "non-default"
compilers. So, I agree this is not "critical", but should definitely be
user-storied for complete fixing, at most for the 1.11 release IMHO.

P.S. The latest screw-up from the C standard committee I've hit:
variable-length arrays aka VLAs aka pretty neat feature of C99.
Excluded from C11. But why? Turns out, C99 doesn't specify how storage
for them would be allocated. And some vendors of "various different
compilers" managed to implement the allocation of clearly automatic
variables using malloc(). Users wailed, then in C11, the same vendors
handed-up: "we can't implement VLAs in our various different compilers
properly", and it was excluded.


[1] And presumably clang, though I didn't check.
Best Regards,
Paul | Open source software for ARM SoCs
Follow Linaro:!/linaroorg -

Join to automatically receive all group messages.