GSoC Status: Week 11

Matthew Windsor mbw500 at york.ac.uk
Mon Sep 2 08:21:09 UTC 2013


Hi,

On 2 September 2013 07:42, David Chisnall <theraven at freebsd.org> wrote:
> On 2 Sep 2013, at 00:54, Eitan Adler <eadler at freebsd.org> wrote:
>
>>> As a minor note, I've pushed the C standard back down to C99.  This
>>> should allow FreeBSD stock gcc to compile the backend.
>>
>> I'm not very worried about this.  If the code is cleaner with C11
>> please feel free to use it.
>
> Agreed.  If the code is destined to live in a port, then the only requirement is that it must be able to compile with a ports compiler.  Ideally, it should compile with gcc 4.7/8 in addition to clang (since clang isn't available on all architectures), but this shouldn't be considered a blocker.

It's fine, the only feature I was using from C11 was anonymous unions,
and the code that used them has since been stripped out, so there
isn't any reason to identify as C11.  (Besides, I think anonymous
unions are a GNU extension to C89/C99 anyway - I'm sure I've seen
pkgng using them somewhere and I assume pkgng isn't C11, but I could
be wrong)

> Also, note that we have tried to ensure that most C11 features (with _Generic being the big exception) work even with our ancient GCC.

I'm not sure if I was doing something wrong, but when I tried to
compile with --std=c11 on GCC (4.2.1, FreeBSD 9) I got 'cc1: error:
unrecognized command line option "-std=c11"'.  This worked fine with
clang.

But anyway, the code appears to compile fine as C99 and as mentioned I
didn't need to make any regressions, so I'll probably keep it at c99
until and unless I need to use a C11 feature again.

~Matt


More information about the soc-status mailing list