This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Last <sys/cdefs.h> change
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: newlib at sourceware dot org
- Date: Thu, 23 May 2013 11:56:52 +0200
- Subject: Re: Last <sys/cdefs.h> change
- References: <519DC581 dot 20602 at embedded-brains dot de> <20130523074440 dot GA11512 at calimero dot vinschen dot de> <519DCD35 dot 3010709 at embedded-brains dot de> <20130523085859 dot GD13513 at calimero dot vinschen dot de> <519DDFFD dot 5030708 at embedded-brains dot de> <20130523094004 dot GI22259 at calimero dot vinschen dot de>
On 05/23/2013 11:40 AM, Corinna Vinschen wrote:
The only broken thing here is coreutils. They set -std=gnu99 and
>use C11 features. They use also _Static_assert() in a way that
>seems to be not available with pre C11 means.
Not quite. They just have a reason to make tests along the lines of
what _Static_assert provides. They check for the compiler version and
find that the compiler already provides _Static_assert. That's where
our cdefs.h header collides. So, here's the question: Given that
collision in the __STDC_VERSION__ == 199901L case, why do*we* (or,
FWIW, FreeBSD) provide _Static_assert, even though __STDC_VERSION__ is <
201112L?
I can only speculate. Maybe FreeBSD wants to do the best to provide a
_Static_assert() for older environments which use it in a more restricted way.
From my point of view using _Static_assert() in such a situation makes no
sense. If you want C11 features, then ask for them.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschÃftliche Mitteilung im Sinne des EHUG.