This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 06/17] Replace delete_longjmp_breakpoint_cleanup with a forward_scope_exit type
- From: "Pavel I. Kryukov" <kryukov at frtk dot ru>
- To: palves at redhat dot com, gdb-patches at sourceware dot org
- Cc: tom at tromey dot com, andrew dot burgess at embecosm dot com
- Date: Thu, 24 Jan 2019 14:23:17 +0300
- Subject: Re: [PATCH v3 06/17] Replace delete_longjmp_breakpoint_cleanup with a forward_scope_exit type
The patch causes build errors on XCode:
$ clang --version
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
In file included from breakpoint.c:34:
In file included from ./inferior.h:54:
./common/forward-scope-exit.h:98:7: error: no matching constructor for
initialization of 'decltype(std::bind(&delete_longjmp_breakpoint,
std::declval<int>()))' (aka '__bind<void (*)(int), int>')
: m_bind_function (std::bind (function, args...))
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./common/gdb_optional.h:155:19: note: in instantiation of member
function 'detail::forward_scope_exit<void (int),
&delete_longjmp_breakpoint, void (int)>::forward_scope_exit' requested
here
new (&m_item) T (std::forward<Args>(args)...);
^
breakpoint.c:11127:18: note: in instantiation of function template
specialization 'gdb::optional<detail::forward_scope_exit<void (int),
&delete_longjmp_breakpoint, void (int)> >::emplace<int &>' requested
here
lj_deleter.emplace (thread);
^
/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:2220:7:
note: candidate constructor (the implicit copy constructor) not
viable: no known conversion from '__bind<[...], int &>' to 'const
__bind<[...], int>' for 1st argument
class __bind
^
/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:2220:7:
note: candidate constructor (the implicit move constructor) not
viable: no known conversion from '__bind<[...], int &>' to
'__bind<[...], int>' for 1st argument
/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:2240:16:
note: candidate template ignored: requirement 'is_constructible<_Fd,
__bind<void (*)(int), int &> >::value' was not satisfied [with _Gp =
std::__1::__bind<void (*)(int), int &>, _BA = <>]
explicit __bind(_Gp&& __f, _BA&& ...__bound_args)
^
1 error generated.
make: *** [breakpoint.o] Error 1
Thanks,
--
Pavel