Am Dienstag, den 29.11.2016, 14:20 -0800 schrieb Julius Werner:
A lot of the GNU extensions are used in our codebase, so if somebody feels strongly about moving away from GNU11 to C11, the code needs to be cleaned up. But that should be done in a different patch set.
I'd like to explicitly object to that. There are many GNU extensions which are simply necessary to write sane, readable and performant code (e.g. to implement non-double-evaluating MIN()/MAX() macros, to cleanly control linking into particular sections, to get performant code generated for IO accessor functions, etc.). The C standard by itself is simply insufficient to support all systems programming use cases, and if we forbade GNU extensions we'd have to rewrite significant parts of coreboot in pure assembly and add weird, hardly readable workarounds for many code patterns. I don't see how this would be worth it just to try to get compatibility with compilers nobody wants to use anyway, or for some theoretical goal of "standards compliance" with no practical benefit. (Note that many GNU extensions are implicitly available even without -std=gnuXX, some of them even if you also enable -Werror=pedantic. But that doesn't not make them GNU extensions, and there'd be no reason to treat them differently from ones that require the -std flag. Ditching GNU extensions would mean that every __attribute__, every __builtin and every extended asm becomes illegal.)
Thank you for the elaborate explanation. I never intended to take on that task, but if I had, you would have convinced me.
I hope using GNU11 suits everyone.