This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: assuming C89?


Eric Blake wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I know that newlib was originally started from code that predates C89,
hence all the macros in <_ansi.h> such as _DEFUN, _AND, and so forth to
allow compilation with either K&R prototypes or standard prototypes.  But
is it still the case that K&R syntax must be supported, or can new files
assume C89 and avoid the contortions?  Similarly, can we now assume that
_HAVE_STDC is always defined, that <stdarg.h> always exists, and other
forms of C89 assumptions, or do new files still have to cater to the
possibility of obsolete <varargs.h>?

- --

The answer is we probably could assume C89 at this point in time without harm, but the work has already been done and is trivial IMO. I wouldn't remove the _DEFUN and _EXFUN macros anyway because it provides the ability for a platform to add specialized function attributes to all the C library function declarations or definitions (e.g. see _ansi.h and __CYGWIN__ reference).


-- Jeff J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]