Re: undefined reference to `memset'

[ Available lists | Index of freebsd-stable | Month of Mar 2005 | Week of 24 Mar 2005 | Raw email | View thread | Wrap long lines | Reply ]
From
Nick Barnes <Nick.Barnes@pobox.com>
Date
24 Mar 2005 10:36:17
Subject
Re: undefined reference to `memset'
Message-ID
90609.1111660565@thrush.ravenbrook.com


[ Hide this part ]
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


Elapsed time: 0.159 seconds