[coreboot] GNU11 and C11

Julius Werner jwerner at chromium.org
Sat Mar 18 01:45:29 CET 2017

> You quoted Julius’ reply [1]. Later he also replied [2].
> > Yes, just to be clear (this has split into so many different threads
> > that I'm no longer sure what the latest decision is?), I only
> > (prematurely) objected to forbidding GNU extensions. Otherwise, I'm
> > totally in favor of switching to C11 and not aware of any difference
> > between the versions that would cause a problem for us.

Just to clarify what I meant, "switching to C11" was in the context of
"away from C89" here. When I wrote C11 I essentially meant -std=gnu11
there. I would still very much oppose enforcing a strict ISO C11 standard
without any GNU extensions (for the reasons stated, and I'm sure I could
come up with more when thinking about it enough). I just think that the C11
standard has way too many holes of things that you just can't solve well if
you abide super strictly to the rules as specified, especially for
low-level systems software like coreboot. Happy to join the discussion if
you guys feel otherwise, of course.

Also (though I think someone already mentioned this?), just wanna point out
that as far as I know clang already perfectly supports all of the GCC GNU
extensions and special behavior we're using. So I think enforcing strict
ISO C would only really make sense if we were also planning to support a
specific compiler beyond GCC and clang, and that should probably be part of
the discussion (i.e. which one and what benefits that would give us to
outweigh all the reasons against it).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20170317/b7cc3543/attachment.html>

More information about the coreboot mailing list