This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Using __chk_fail from libstdc++
On Fri, Jun 01, 2012 at 11:52:57AM -0700, Roland McGrath wrote:
> I thought of that too but didn't think I cared. We don't have an
> existing header that seems appropriate. Since it's an __ function,
> it shouldn't really be declared in a "user" header. So I guess it
> would be some new header like <bits/fortify.h>. But then libstdc++
> would require a new-enough libc to have that header. If this is
> only going to be called from the library itself that doesn't seem
> like a problem since it can just autoconf it. But if Florian
> intends to call it from libstdc++ header files (e.g. template code)
> then it could be an issue.
It can be
namespace __gnu_cxx
{
extern "C" void __chk_fail () __attribute__((noreturn));
};
...
__gnu_cxx::__chk_fail ();
on the libstdc++ side IMHO (or some other appropriate namespace).
Jakub