GSoC Status: Week 11

David Chisnall theraven at freebsd.org
Mon Sep 2 08:28:50 UTC 2013


On 2 Sep 2013, at 09:21, Matthew Windsor <mbw500 at york.ac.uk> wrote:

> 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)

Yes, anonymous unions are a GCC extension, so they'll work with both clang and gcc 4.2.1

>> 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.

Correct.  The compiler doesn't know about the c11 dialect, however most c11 code should compile with -std=gnu99.  Things like anonymous unions are GNU extensions, things like _Static_assert, _Thread_local and so on are macros defined in cdefs.h.

David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/soc-status/attachments/20130902/5668aca0/attachment.sig>


More information about the soc-status mailing list