Dear Ron,
Am Freitag, den 17.03.2017, 20:48 +0000 schrieb ron minnich:
On Fri, Mar 17, 2017 at 11:30 AM Nico Huber wrote:
The decision was to make explicit what was already needed for a long time (already last time Clang was working). Don't worry about Clang, it can digest -std=gnu11 as well [1].
If that works for this project, then I guess that's ok. Harvey, on the other hand, also intends to use the intel compiler (ICC). -std=gnu11 is not an option we would ever use.
Currently, coreboot *does* use these GNU extensions. So the code would not built, when disallowing the compiler to use them. I think there is no objection to move to C11, if somebody rewrites the code using GNU11 extensions.
Thanks,
Paul
On Fri, Mar 17, 2017 at 3:32 PM Paul Menzel via coreboot < coreboot@coreboot.org> wrote:
I think there is no objection to move to C11, if somebody rewrites the code using GNU11 extensions.
Paul, the discussion I read made it clear that there were lots of objections to moving away from GNU11 extensions, viz.
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. "
Now, I don't actually agree with all this, but the decision was made to go with GNU11, not C11.
thanks
ron