This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Fwd: POSIX 2008 C Extensions and restrict Keyword
- From: "Jonathan S. Shapiro" <shap at eros-os dot org>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Tue, 9 Jul 2013 10:25:52 -0700
- Subject: Fwd: POSIX 2008 C Extensions and restrict Keyword
- References: <51DC150C dot 1010109 at oarcorp dot com> <51DC3353 dot 5050401 at LGSInnovations dot com> <CAAP=3QPoTPnUpc2f0YXFkwzPNk4QaiDQZPuWbhG7eRy9yGR-Qg at mail dot gmail dot com>
Sorry - meant this for the list
On Tue, Jul 9, 2013 at 8:59 AM, Craig Howland
<howland@lgsinnovations.com> wrote:
>
>
> Assuming that it is done, however, we should use restrict, not __restrict. The latter apparently dates from 2000 when the keyword was brand new. Since it is now pushing 14 years, I suggest that updating sys/cdefs.h to get rid of the __ is in order....
This is a particular case of a general argument. I should think the
right way to proceed is to document that newlib requires compliance
with at least {list of standards}, and then go through more generally
and clean out stuff intended to support obsolete compilers.
Two caveats:
1. Some embedded targets are still stuck on legacy compilers. I don't
know how many, which ones, and whether we should care.
2. Visual C, in particular, has haphazard standard support. Again, I
don't know if this compiler is of any interest for newlib. Visual C++
2011 still doesn't comply with C99. Visual C++ 2013 plans
improvements, but not complete compliance. Where C99 is supported, it
is often with non-compliant syntax, semantics, and keywords. Which
defies any definition of "support" that I comprehend, but there it is.
On the bright side, WIndows users can always use the Intel compiler,
which does support newer standards fully.