PR c/88660
* c-parser.c (c_parser_switch_statement): Make sure to request
marking the switch expr as used.
PR c/88660
* gcc.dg/pr88660.c: New test.
+2020-01-30 Jeff Law <law@redhat.com>
+
+ PR c/88660
+ * c-parser.c (c_parser_switch_statement): Make sure to request
+ marking the switch expr as used.
+
2020-01-22 Joseph Myers <joseph@codesourcery.com>
PR c/93348
&& c_token_starts_typename (c_parser_peek_2nd_token (parser)))
explicit_cast_p = true;
ce = c_parser_expression (parser);
- ce = convert_lvalue_to_rvalue (switch_cond_loc, ce, true, false);
+ ce = convert_lvalue_to_rvalue (switch_cond_loc, ce, true, true);
expr = ce.value;
/* ??? expr has no valid location? */
parens.skip_until_found_close (parser);
+2020-01-30 Jeff Law <law@redhat.com
+
+ PR c/88660
+ * gcc.dg/pr88660.c: New test
+
2020-01-30 Jakub Jelinek <jakub@redhat.com>
PR lto/93384
--- /dev/null
+/* { dg-do-compile } */
+/* { dg-options "-O -Wunused-but-set-variable" } */
+
+int main(void)
+{
+ const int i = 0;
+ switch(i)
+ {
+ default: break;
+ }
+}
+
+