On 06 June 2007 14:35, Tim Prince wrote:

> I have patched stdio.h, but it may not be your latest recommendation.

  This does indeed turn out to be the problem.  In your local patched stdio.h
you have:

#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
#define ELIDABLE_INLINE extern inline
#else
#define ELIDABLE_INLINE inline
#endif

which isn't valid in the case of -ansi.  The patch as actually applied has:

#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
/* We're using GCC, but without the new C99-compatible behaviour.  */
#define _ELIDABLE_INLINE extern __inline__ _ATTRIBUTE ((__always_inline__))
#else
/* We're using GCC in C99 mode, or an unknown compiler which
  we just have to hope obeys the C99 semantics of inline.  */
#define _ELIDABLE_INLINE __inline__
#endif

and for the reasons why, see:

http://sourceware.org/ml/newlib/2007/msg00295.html
http://sourceware.org/ml/newlib/2007/msg00296.html
http://sourceware.org/ml/newlib/2007/msg00326.html

  Tim, please try replacing your hand-patched stdio.h with the version from
newlib cvs HEAD and test again; I believe this will fix your problem.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

Reply via email to