===================================================================
@@ -5418,7 +5418,7 @@ build_new_op_1 (location_t loc, enum tree_code cod
case BIT_AND_EXPR:
case BIT_IOR_EXPR:
case BIT_XOR_EXPR:
- return cp_build_binary_op (input_location, code, arg1, arg2, complain);
+ return cp_build_binary_op (loc, code, arg1, arg2, complain);
case UNARY_PLUS_EXPR:
case NEGATE_EXPR:
===================================================================
@@ -5,7 +5,7 @@
/* Some targets do not provide <complex.h> so we define I ourselves. */
#define I 1.0iF
-#define ID ((_Complex double)I) // { dg-warning "implicit" }
+#define ID ((_Complex double)I)
float f;
double d;
@@ -36,7 +36,7 @@ usual_arithmetic_conversions(void)
local_cf = cf + 1.0; /* { dg-warning "implicit" } */
local_cf = cf - d; /* { dg-warning "implicit" } */
- local_cf = cf + 1.0 * ID; /* { dg-message "in expansion of macro 'ID'" } */
+ local_cf = cf + 1.0 * ID; /* { dg-warning "implicit" } */
local_cf = cf - cd; /* { dg-warning "implicit" } */
local_f = i ? f : d; /* { dg-warning "implicit" } */
===================================================================
@@ -0,0 +1,14 @@
+// PR c++/23608
+// { dg-options "-Wsign-compare" }
+
+#define FIVE 5
+
+int main()
+{
+ int i = 5;
+ int const ic = 5;
+
+ i < 5u; // { dg-warning "5:comparison between signed and unsigned" }
+ ic < 5u;
+ FIVE < 5u;
+}