PR c++/67863
* call.c (build_conditional_expr_1): Build the COND_EXPR with
a location.
* c-c++-common/Wtautological-compare-4.c: New test.
From-SVN: r228540
+2015-10-06 Marek Polacek <polacek@redhat.com>
+
+ PR c++/67863
+ * call.c (build_conditional_expr_1): Build the COND_EXPR with
+ a location.
+
2015-10-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53856
return error_mark_node;
valid_operands:
- result = build3 (COND_EXPR, result_type, arg1, arg2, arg3);
+ result = build3_loc (loc, COND_EXPR, result_type, arg1, arg2, arg3);
if (!cp_unevaluated_operand)
/* Avoid folding within decltype (c++/42013) and noexcept. */
result = fold_if_not_in_template (result);
+2015-10-06 Marek Polacek <polacek@redhat.com>
+
+ PR c++/67863
+ * c-c++-common/Wtautological-compare-4.c: New test.
+
2015-10-05 Michael Meissner <meissner@linux.vnet.ibm.com>
Peter Bergner <bergner@vnet.ibm.com>
--- /dev/null
+/* PR c++/67863 */
+/* { dg-do compile } */
+/* { dg-options "-Wtautological-compare" } */
+
+extern int e;
+#define A (e ? 4 : 8)
+#define B (e ? 4 : 8)
+
+int
+fn (void)
+{
+ if (A <= B)
+ return 1;
+ return 0;
+}