Linux MIPS Architecture development
 help / color / mirror / Atom feed
* memcpy embedded in gcc?
@ 2003-02-13 20:07 Long Li
  2003-02-13 20:14 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Long Li @ 2003-02-13 20:07 UTC (permalink / raw)
  To: linux-mips

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?

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


Thanks a lot!


Long


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: memcpy embedded in gcc?
  2003-02-13 20:07 memcpy embedded in gcc? Long Li
@ 2003-02-13 20:14 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2003-02-13 20:14 UTC (permalink / raw)
  To: Long Li; +Cc: linux-mips

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-13 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-13 20:07 memcpy embedded in gcc? Long Li
2003-02-13 20:14 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox