This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Implement link-time optimization safe explicit_bzero()?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- Cc: Sebastian Huber <sebastian dot huber at embedded-brains dot de>, gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Fri, 12 Feb 2016 10:59:28 +0000
- Subject: Re: Implement link-time optimization safe explicit_bzero()?
- Authentication-results: sourceware.org; auth=none
- References: <1976196369 dot 87764 dot 1455200966087 dot JavaMail dot zimbra at embedded-brains dot de> <56BCB5F0 dot 6090402 at manchester dot ac dot uk> <554113087 dot 88334 dot 1455258067427 dot JavaMail dot zimbra at embedded-brains dot de> <56BDB70D dot 9070109 at gmail dot com>
On 12 February 2016 at 10:42, Manuel LÃpez-IbÃÃez wrote:
> On 12/02/16 06:21, Sebastian Huber wrote:
>> Ok, since I am not a compiler expert, I need an example for this. My
>> first try was to search for the memset_s() builtin. However, this doesn't
>> seem to exist. Is memset_s() supported at all by GCC currently?
>
>
> See
> https://gcc.gnu.org/git/?p=gcc.git;a=blob_plain;f=gcc/builtins.def;hb=HEAD
>
> memset_s is not there, so I guess it is not provided as a builtin, but
> implemented by the C library. Probably it is not LTO-safe either.
It's not provided by most C libraries. It's part of the "safe"
additions to C, but is broken by design.