]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/cp/typeck.c
c++: avoid non-TARGET_EXPR class prvalues
[gcc.git] / gcc / cp / typeck.c
index 50d0f1e6a62aa402c5f16626ec435073c753b009..5af47ce89a94f288b2a3dfded8f2ab6338d3767c 100644 (file)
@@ -5931,6 +5931,8 @@ cp_build_binary_op (const op_location_t &location,
 
   if (!processing_template_decl)
     {
+      if (resultcode == SPACESHIP_EXPR)
+       result = get_target_expr_sfinae (result, complain);
       op0 = cp_fully_fold (op0);
       /* Only consider the second argument if the first isn't overflowed.  */
       if (!CONSTANT_CLASS_P (op0) || TREE_OVERFLOW_P (op0))
This page took 0.029616 seconds and 5 git commands to generate.