Index: gcc/c-family/c-attribs.c
===================================================================
--- gcc/c-family/c-attribs.c	(revision 278510)
+++ gcc/c-family/c-attribs.c	(working copy)
@@ -4117,7 +4117,7 @@ tree
 handle_fallthrough_attribute (tree *, tree name, tree, int,
 			      bool *no_add_attrs)
 {
-  warning (OPT_Wattributes, "%qE attribute ignored", name);
+  pedwarn (input_location, OPT_Wattributes, "%qE attribute ignored", name);
   *no_add_attrs = true;
   return NULL_TREE;
 }
Index: gcc/gimplify.c
===================================================================
--- gcc/gimplify.c	(revision 278510)
+++ gcc/gimplify.c	(working copy)
@@ -2405,8 +2405,8 @@ expand_FALLTHROUGH_r (gimple_stmt_iterator *gsi_p,
 	      gsi_next (&gsi2);
 	    }
 	  if (!found)
-	    warning_at (loc, 0, "attribute %<fallthrough%> not preceding "
-			"a case label or default label");
+	    pedwarn (loc, 0, "attribute %<fallthrough%> not preceding "
+		     "a case label or default label");
 	}
       break;
     default:
@@ -2428,8 +2428,8 @@ expand_FALLTHROUGH (gimple_seq *seq_p)
   if (wi.callback_result == integer_zero_node)
     /* We've found [[fallthrough]]; at the end of a switch, which the C++
        standard says is ill-formed; see [dcl.attr.fallthrough].  */
-    warning_at (loc, 0, "attribute %<fallthrough%> not preceding "
-		"a case label or default label");
+    pedwarn (loc, 0, "attribute %<fallthrough%> not preceding "
+	     "a case label or default label");
 }
 
 
Index: gcc/testsuite/gcc.dg/c2x-attr-fallthrough-1.c
===================================================================
--- gcc/testsuite/gcc.dg/c2x-attr-fallthrough-1.c	(revision 278510)
+++ gcc/testsuite/gcc.dg/c2x-attr-fallthrough-1.c	(working copy)
@@ -3,7 +3,7 @@
 /* { dg-options "-std=c2x -pedantic-errors -Wextra" } */
 
 int
-f (int a)
+f (int a, int c)
 {
   int b = 2;
   switch (a)
@@ -22,6 +22,21 @@ int
     case 5:
       b += 1;
       break;
+    case 6:
+      if (c == 2)
+	{
+	  [[fallthrough]];
+	}
+      else
+	{
+	  [[fallthrough]];
+	}
+    case 7:
+      b += 3;
+      [[fallthrough]];
+    default:
+      b += 8;
+      break;
     }
   return b;
 }
Index: gcc/testsuite/gcc.dg/c2x-attr-fallthrough-2.c
===================================================================
--- gcc/testsuite/gcc.dg/c2x-attr-fallthrough-2.c	(revision 278510)
+++ gcc/testsuite/gcc.dg/c2x-attr-fallthrough-2.c	(working copy)
@@ -15,7 +15,8 @@ int z = sizeof (int [[fallthrough]]); /* { dg-erro
 int
 f (int a)
 {
-  [[fallthrough]] int b = 2; /* { dg-warning "not followed by|ignored" } */
+  [[fallthrough]] int b = 2; /* { dg-warning "not followed by" } */
+  /* { dg-error "ignored" "ignored" { target *-*-* } .-1 } */
   switch (a)
     {
     case 1:
Index: gcc/testsuite/gcc.dg/c2x-attr-fallthrough-3.c
===================================================================
--- gcc/testsuite/gcc.dg/c2x-attr-fallthrough-3.c	(revision 278510)
+++ gcc/testsuite/gcc.dg/c2x-attr-fallthrough-3.c	(working copy)
@@ -1,5 +1,5 @@
 /* Test C2x attribute syntax.  Invalid use of fallthrough attribute
-   outside switch or in bad context inside switch.  */
+   outside switch.  */
 /* { dg-do compile } */
 /* { dg-options "-std=c2x -pedantic-errors -Wextra" } */
 
@@ -7,12 +7,5 @@ int
 f (int a)
 {
   [[fallthrough]]; /* { dg-error "invalid use of attribute 'fallthrough'" } */
-  switch (a)
-    {
-    case 1:
-      a++;
-      [[fallthrough]]; /* { dg-warning "attribute 'fallthrough' not preceding a case label or default label" } */
-      a++;
-    }
   return a;
 }
Index: gcc/testsuite/gcc.dg/c2x-attr-fallthrough-6.c
===================================================================
--- gcc/testsuite/gcc.dg/c2x-attr-fallthrough-6.c	(nonexistent)
+++ gcc/testsuite/gcc.dg/c2x-attr-fallthrough-6.c	(working copy)
@@ -0,0 +1,18 @@
+/* Test C2x attribute syntax.  Invalid use of fallthrough attribute in
+   bad context inside switch.  */
+/* { dg-do compile } */
+/* { dg-options "-std=c2x -pedantic-errors -Wextra" } */
+
+int
+f (int a)
+{
+  switch (a)
+    {
+    case 1:
+      a++;
+      [[fallthrough]]; /* { dg-error "attribute 'fallthrough' not preceding a case label or default label" } */
+      a++;
+      [[fallthrough]]; /* { dg-error "attribute 'fallthrough' not preceding a case label or default label" } */
+    }
+  return a;
+}
