re PR c++/80682 (__is_trivially_constructible(void, int) returns true.)
PR c++/80682 cp/ PR c++/80682 * method.c (is_trivially_xible): Reject void types. testsuite/ PR c++/80682 * g++.dg/ext/is_trivially_constructible1.C: Add tests for void target. From-SVN: r247880
This commit is contained in:
parent
687aed9cc8
commit
e81c832812
@ -1,3 +1,8 @@
|
||||
2017-05-11 Ville Voutilainen <ville.voutilainen@gmail.com>
|
||||
|
||||
PR c++/80682
|
||||
* method.c (is_trivially_xible): Reject void types.
|
||||
|
||||
2017-05-10 Nathan Sidwell <nathan@acm.org>
|
||||
|
||||
* class.c (handle_using_decl): Always use OVL_CURRENT.
|
||||
|
@ -1207,6 +1207,8 @@ constructible_expr (tree to, tree from)
|
||||
bool
|
||||
is_trivially_xible (enum tree_code code, tree to, tree from)
|
||||
{
|
||||
if (VOID_TYPE_P (to))
|
||||
return false;
|
||||
tree expr;
|
||||
if (code == MODIFY_EXPR)
|
||||
expr = assignable_expr (to, from);
|
||||
|
@ -27,10 +27,18 @@ SA(!__is_trivially_constructible(C,C&));
|
||||
SA(__is_trivially_assignable(C,C&));
|
||||
SA(!__is_trivially_assignable(C,C));
|
||||
SA(!__is_trivially_assignable(C,C&&));
|
||||
SA(!__is_trivially_assignable(void,int));
|
||||
SA(!__is_trivially_assignable(const void,int));
|
||||
SA(!__is_trivially_assignable(volatile void,int));
|
||||
SA(!__is_trivially_assignable(const volatile void,int));
|
||||
|
||||
SA(__is_trivially_constructible(int,int));
|
||||
SA(__is_trivially_constructible(int,double));
|
||||
SA(!__is_trivially_constructible(int,B));
|
||||
SA(!__is_trivially_constructible(void,int));
|
||||
SA(!__is_trivially_constructible(const void,int));
|
||||
SA(!__is_trivially_constructible(volatile void,int));
|
||||
SA(!__is_trivially_constructible(const volatile void,int));
|
||||
|
||||
SA(!__is_trivially_constructible(D));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user