This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/5] Poison non-POD memset & non-trivially-copyable memcpy/memmove


Pedro Alves <palves@redhat.com> writes:

Hi Pedro,

> +/* True if "T *" is relocatable.  I.e., copyable with memcpy/memmove.
> +   I.e., T is either trivially copyable, or void.  */
> +template<typename T>
> +struct IsRelocatable
> +  : gdb::Or<std::is_void<T>,
> +	    std::is_trivially_copyable<T>>
> +{};

This breaks the build with gcc 4.8,

In file included from ../../binutils-gdb/gdb/common/common-defs.h:85:0,
                 from ../../binutils-gdb/gdb/defs.h:28,
                 from ../../binutils-gdb/gdb/gdb.c:19:
../../binutils-gdb/gdb/common/poison.h:66:6: error: ‘is_trivially_copyable’ is not a member of ‘std’
      std::is_trivially_copyable<T>>
      ^

you probably have already received the buildbot fail message
https://gdb-build.sergiodj.net/builders/Ubuntu-AArch64-m64/builds/1845

is_trivially_copyable is missing on 4.9 too,
https://gcc.gnu.org/onlinedocs/gcc-4.9.4/libstdc++/manual/manual/status.html#status.iso.2011
and it was added in gcc 5, as far as I know.

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]