+2016-11-16 Marek Polacek <polacek@redhat.com>
+
+ PR c/78285
+ * c-common.c (c_add_case_label): Turn error_at calls into inform.
+
2016-11-14 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
if (high_value)
{
error_at (loc, "duplicate (or overlapping) case value");
- error_at (DECL_SOURCE_LOCATION (duplicate),
- "this is the first entry overlapping that value");
+ inform (DECL_SOURCE_LOCATION (duplicate),
+ "this is the first entry overlapping that value");
}
else if (low_value)
{
error_at (loc, "duplicate case value") ;
- error_at (DECL_SOURCE_LOCATION (duplicate), "previously used here");
+ inform (DECL_SOURCE_LOCATION (duplicate), "previously used here");
}
else
{
error_at (loc, "multiple default labels in one switch");
- error_at (DECL_SOURCE_LOCATION (duplicate),
- "this is the first default label");
+ inform (DECL_SOURCE_LOCATION (duplicate),
+ "this is the first default label");
}
goto error_out;
}
+2016-11-16 Marek Polacek <polacek@redhat.com>
+
+ PR c/78285
+ * gcc.dg/switch-5.c: Turn several dg-errors into dg-messages.
+ * g++.dg/ext/case-range2.C: Likewise.
+
2016-11-16 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/58001
{
switch (i)
{
- case low ... high : return i + 1; // { dg-error "previously" }
+ case low ... high : return i + 1; // { dg-message "previously" }
case 5 : return i + 2; // { dg-error "duplicate" }
default : return 0;
}
int f (int i)
{
switch (i) {
- case 1 ... 10: return i + 1; // { dg-error "first entry" }
+ case 1 ... 10: return i + 1; // { dg-message "first entry" }
case 3 ... 5 : return i + 3; // { dg-error "duplicate" }
default: return f2 (i); // { dg-message "required" }
}
switch (a)
{
case 0:
- default: /* { dg-error "this is the first default label" } */
+ default: /* { dg-message "this is the first default label" } */
case 1:
default: ; /* { dg-error "multiple default labels in one switch" } */
}
switch (a)
{
- case 0: /* { dg-error "previously used here" } */
+ case 0: /* { dg-message "previously used here" } */
case 1:
case 0: ; /* { dg-error "duplicate case value" } */
}
}
switch (a)
{
- case 0: /* { dg-error "this is the first entry overlapping that value" } */
+ case 0: /* { dg-message "this is the first entry overlapping that value" } */
case -1 ... 1: /* { dg-error "duplicate \\(or overlapping\\) case value" } */
- case 2 ... 3: /* { dg-error "previously used here" } */
+ case 2 ... 3: /* { dg-message "previously used here" } */
case 2: /* { dg-error "duplicate case value" } */
- case 4 ... 7: /* { dg-error "this is the first entry overlapping that value" } */
+ case 4 ... 7: /* { dg-message "this is the first entry overlapping that value" } */
case 6 ... 9: ; /* { dg-error "duplicate \\(or overlapping\\) case value" } */
}
switch (a)