undefined reference to `memset'

Nick Barnes Nick.Barnes at pobox.com
Thu Mar 24 02:36:17 PST 2005


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


More information about the freebsd-amd64 mailing list