public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Martin Dalecki <dalecki@evision-ventures.com>
Cc: Horst von Brand <vonbrand@sleipnir.valparaiso.cl>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.4.0-test10-pre6: Use of abs()
Date: Mon, 30 Oct 2000 08:19:39 -0500	[thread overview]
Message-ID: <20001030081938.K6207@devserv.devel.redhat.com> (raw)
In-Reply-To: <200010281629.e9SGTah07672@sleipnir.valparaiso.cl> <39FD7F2C.9A3F3976@evision-ventures.com>
In-Reply-To: <39FD7F2C.9A3F3976@evision-ventures.com>; from dalecki@evision-ventures.com on Mon, Oct 30, 2000 at 03:01:16PM +0100

On Mon, Oct 30, 2000 at 03:01:16PM +0100, Martin Dalecki wrote:
> Horst von Brand wrote:
> > 
> > Red Hat 7.0, i686, gcc-20001027 (Yes, I know. Just to flush out bugs on
> > both sides).
> > 
> > abs() is used at least in:
> > 
> > arch/i386/kernel/time.c
> > drivers/md/raid1.c
> > drivers/sound/sb_ess.c
> > 
> > gcc warns about use of a non-declared function each time.
> > 
> > No definition for the function is to be found (grep over all include/ comes
> > up clean, except for extern definitions in asm-{mips,ppc}; ditto for lib/).
> > Presumably gcc is using a builtin (it doesn't show up in System.map). Is
> > this the desired state of affairs? Should a include/linux/stdlib.h be
> 
> Yes abs will be transformed into an internal function, which will be
> fully
> unrolled due to -O2.

No matter what it should be prototyped in some header. And all uses should
be checked, because abs is 
int abs (int) __attribute__ ((__const__));
and sometimes people use it on `long' instead (such a bug has been fixed in
the kernel some months ago).

	Jakub
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-10-30 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-28 16:29 2.4.0-test10-pre6: Use of abs() Horst von Brand
2000-10-30 14:01 ` Martin Dalecki
2000-10-30 13:19   ` Jakub Jelinek [this message]
2000-10-30 16:14     ` Martin Dalecki
2000-11-01 14:46       ` tytso
2000-11-01 18:22         ` Richard Henderson
2000-11-02 12:14           ` Martin Dalecki
2000-11-02 19:37             ` Richard Henderson
2000-11-02  3:02         ` Theodore Y. Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001030081938.K6207@devserv.devel.redhat.com \
    --to=jakub@redhat.com \
    --cc=dalecki@evision-ventures.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vonbrand@sleipnir.valparaiso.cl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox