Fwd: POSIX 2008 C Extensions and restrict Keyword
Jonathan S. Shapiro
shap@eros-os.org
Tue Jul 9 17:25:00 GMT 2013
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.
More information about the Newlib
mailing list