PR c++/84171
* c-warn.c (warn_for_sign_compare): Bail out if any of the operands
is erroneous.
* g++.dg/warn/Wsign-compare-8.C: New test.
From-SVN: r258147
+2018-03-02 Marek Polacek <polacek@redhat.com>
+
+ PR c++/84171
+ * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
+ is erroneous.
+
2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
* c-attribs.c (c_common_attribute_table): Remove "cilk simd
tree op0, tree op1,
tree result_type, enum tree_code resultcode)
{
+ if (error_operand_p (orig_op0) || error_operand_p (orig_op1))
+ return;
+
int op0_signed = !TYPE_UNSIGNED (TREE_TYPE (orig_op0));
int op1_signed = !TYPE_UNSIGNED (TREE_TYPE (orig_op1));
int unsignedp0, unsignedp1;
+2018-03-02 Marek Polacek <polacek@redhat.com>
+
+ PR c++/84171
+ * g++.dg/warn/Wsign-compare-8.C: New test.
+
2018-03-02 Jakub Jelinek <jakub@redhat.com>
PR c++/84662
--- /dev/null
+// PR c++/84171
+// { dg-options "-Wsign-compare" }
+
+bool foo (char c)
+{
+ const int i = 0 = 0; // { dg-error "lvalue" }
+ return c = i;
+} // { dg-warning "control reaches" }