Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Sep 2013 08:21:07 +0000
From:      Matthew Windsor <mbw500@york.ac.uk>
To:        David Chisnall <theraven@freebsd.org>
Cc:        Justin Edward Muniz <jmuniz@freebsd.org>, soc-status@freebsd.org, Eitan Adler <eadler@freebsd.org>
Subject:   Re: GSoC Status: Week 11
Message-ID:  <CAFxS2CiHBj2BzDGMDQHU7qwsURHHWYNuSYk=EpWH_SWjTwYF3A@mail.gmail.com>
In-Reply-To: <440E5361-BC33-49DD-B51D-C77E9880BD1A@FreeBSD.org>
References:  <CAFxS2Cir5QMU2xKYbGpxSu5jLyEUs%2BBnEzv2stoNw%2BO=95Q_pA@mail.gmail.com> <CAF6rxgkK6HOY3ErR5T4coDO3ORGtzf5jN-gg13JbCSKU6vtTkg@mail.gmail.com> <440E5361-BC33-49DD-B51D-C77E9880BD1A@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On 2 September 2013 07:42, David Chisnall <theraven@freebsd.org> wrote:
> On 2 Sep 2013, at 00:54, Eitan Adler <eadler@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 require=
ment 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 avai=
lable 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 _Gen=
eric 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=3Dc11 on GCC (4.2.1, FreeBSD 9) I got 'cc1: error:
unrecognized command line option "-std=3Dc11"'.  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFxS2CiHBj2BzDGMDQHU7qwsURHHWYNuSYk=EpWH_SWjTwYF3A>