Commit 6e9a85d5 by Jason Merrill Committed by Jason Merrill

* typeck.c (cp_build_binary_op): Sorry about <=> on VECTOR_TYPE.

From-SVN: r278077
parent 2965eaa8
2019-11-11 Jason Merrill <jason@redhat.com>
* typeck.c (cp_build_binary_op): Sorry about <=> on VECTOR_TYPE.
2019-11-11 Jakub Jelinek <jakub@redhat.com>
PR c++/92447
......
......@@ -5224,6 +5224,13 @@ cp_build_binary_op (const op_location_t &location,
"types %qT and %qT", type0, type1);
}
if (resultcode == SPACESHIP_EXPR)
{
if (complain & tf_error)
sorry_at (location, "three-way comparison of vectors");
return error_mark_node;
}
/* Always construct signed integer vector type. */
intt = c_common_type_for_size
(GET_MODE_BITSIZE (SCALAR_TYPE_MODE (TREE_TYPE (type0))), 0);
......
// { dg-do compile { target c++2a } }
#include <compare>
#define vector __attribute__((vector_size(4*sizeof(int)) ))
int main()
{
vector int a, b;
a <=> b; // { dg-message "three-way comparison of vector" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment