[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] warning: built-in function `index' declared asnon-fun

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] warning: built-in function `index' declared asnon-function
Date: Fri, 9 May 2003 15:00:34 +0200 (MET DST)

"Christopher X. Candreva" <address@hidden> wrote:

> FWIW - index is still an active function according to the man pages
> under linux glibc, along with rindex

It ought to be deprecated, since the C standard has strchr() for it
(and strrchr() for rindex()).  But Linux doesn't even deprecate
<malloc.h>... (which has been obsolete for almost 15 years).

Matters are a bit different with bzero(): though it's equivalent to
the (standardized) memset(..., 0, ...), there could be architectures
where initializing with zero (i. e. bzero()) can be implemented more
effectively than implementing with an arbitrary value.

Btw., i've been wrong regarding the origin: it's not old BSD, my man
page claims these functions originate in V6 UNIX.  However, BSD has
been maintaining their tradition for quite some time, while old SysV
UNIX went the C standard's route of moving to

> If you have access to a linux (or any other Unix variant) ...

Sure.  I've been verifying my FreeBSD man pages before posting. :-)

Back to the question: we don't prototype the old functions in
avr-libc, so it's IMHO wrong that our compiler has a builtin for it.
(It's OK that the compiler has builtins for strchr() & Co, because
they are mandated by the standard.)

J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]