linux-mips
[Top] [All Lists]

Re: memcpy embedded in gcc?

To: Long Li <long21st@yahoo.com>
Subject: Re: memcpy embedded in gcc?
From: Daniel Jacobowitz <dan@debian.org>
Date: Thu, 13 Feb 2003 15:14:17 -0500
Cc: linux-mips@linux-mips.org
In-reply-to: <20030213200757.92340.qmail@web40411.mail.yahoo.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030213200757.92340.qmail@web40411.mail.yahoo.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.1i
On Thu, Feb 13, 2003 at 12:07:57PM -0800, Long Li wrote:
> Hi,
> 
> I am using a gcc 3.0.4 MIPS crosscompiler on Redhat. I
> found something interesting: when I use specifly -O1
> for compilation, and I can use memcpy function even I
> did not tell the compiler where I declard it or define
> it. However, when I specify -O0, then the compiler
> tells me undefined reference to this memcpy function.
> So my questions are:
> 
> 1. Is memcpy a built-in function for gcc? But why not
> for optimization level 0?

Because using it is an optimization.

> 2. Besides memcpy, is there any other functions built
> in too?

Lots.  The list varies depending on the GCC version; see the manual.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

<Prev in Thread] Current Thread [Next in Thread>