Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2005 10:36:05 +0000
From:      Nick Barnes <Nick.Barnes@pobox.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: undefined reference to `memset' 
Message-ID:  <90609.1111660565@thrush.ravenbrook.com>
In-Reply-To: <20050324182524.J97436@delplex.bde.org>  from Bruce Evans <bde@zeta.org.au>  of "Thu, 24 Mar 2005 19:31:14 %2B1100"

next in thread | previous in thread | raw e-mail | index | archive | help
At 2005-03-24 08:31:14+0000, Bruce Evans writes:

> what is gcc to do when -fno-builtin tells it to turn off its
> builtins and -ffreestanding tells it that the relevant interfaces
> might not exist in the library?

Plainly, GCC should generate code which fills the array with zeroes.
It's not obliged to generate code which calls memset (either builtin
or in a library).  If it knows that it can do so, then fine.
Otherwise it must do it the Old Fashioned Way.  So this is surely a
bug in GCC.

Nick B, who used to write compilers for a living



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90609.1111660565>