delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/02/28/14:31:44

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10202281922.AA28197@clio.rice.edu>
Subject: Re: v2.03 refresh++ diffs [was bzero...]
To: eliz AT is DOT elta DOT co DOT il
Date: Thu, 28 Feb 2002 13:22:23 -0600 (CST)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <3405-Thu28Feb2002205457+0200-eliz@is.elta.co.il> from "Eli Zaretskii" at Feb 28, 2002 08:54:57 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> > > Is the built-in used even when compiling without optimizations?
> > 
> > Yes, it appears so (if GCC >= 3, even without -O, -S shows inlined code).
> 
> How about -fno-builtin?

Already tested - works OK (workers on Feb-7 12:25).

> > Is this a problem?
> 
> If the compiler sometimes picks up the builtin and sometimes the
> library version (which behaves differently as far as the return value
> is concerned), we could have subtle and hard-to-debug problems which
> appear and disappear depending on the compiler switches.

If you include the header, and GCC >=3, you always get the built-in.
The library routine returns a value in EAX but is otherwise identical
in behavior, and ignoring that EAX will not cause any program to break.
So even if you miss including string.h in some module, everything 
should still work and be consistent; even if you mixed binary object
libraries using bzero you should be OK.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019