diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 65f0f112011..30790006ac9 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -11120,10 +11120,12 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr)
       if (cp_lexer_next_token_is_keyword (parser->lexer, RID_THIS))
 	{
 	  location_t loc = cp_lexer_peek_token (parser->lexer)->location;
-	  if (cxx_dialect < cxx20
+	  if (cxx_dialect < cxx20 && pedantic
 	      && LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda_expr) == CPLD_COPY)
-	    pedwarn (loc, 0, "explicit by-copy capture of %<this%> redundant "
-		     "with by-copy capture default");
+	    pedwarn (loc, OPT_Wc__20_extensions,
+		     "explicit by-copy capture of %<this%> "
+		     "with by-copy capture default only available with "
+		     "%<-std=c++20%> or %<-std=gnu++20%>");
 	  cp_lexer_consume_token (parser->lexer);
 	  if (LAMBDA_EXPR_THIS_CAPTURE (lambda_expr))
 	    pedwarn (input_location, 0,
diff --git a/gcc/testsuite/g++.dg/cpp1z/lambda-this1.C b/gcc/testsuite/g++.dg/cpp1z/lambda-this1.C
index b13ff8b9fc6..e12330a8291 100644
--- a/gcc/testsuite/g++.dg/cpp1z/lambda-this1.C
+++ b/gcc/testsuite/g++.dg/cpp1z/lambda-this1.C
@@ -18,7 +18,7 @@ struct A {
     auto i = [=] { return a; };		// { dg-warning "implicit capture" "" { target c++2a } }
     auto j = [&] { return a; };
     // P0409R2 - C++2A lambda capture [=, this]
-    auto k = [=, this] { return a; };// { dg-error "explicit by-copy capture of 'this' redundant with by-copy capture default" "" { target c++17_down } }
+    auto k = [=, this] { return a; };// { dg-error "explicit by-copy capture of 'this' with by-copy capture default only available with" "" { target c++17_down } }
     auto l = [&, this] { return a; };
     auto m = [=, *this] { return a; };// { dg-error "'*this' capture only available with" "" { target c++14_down } }
     auto n = [&, *this] { return a; };// { dg-error "'*this' capture only available with" "" { target c++14_down } }
@@ -27,12 +27,12 @@ struct A {
 					// { dg-error "'*this' capture only available with" "" { target c++14_down } .-1 }
     auto q = [=, this, *this] { return a; };// { dg-error "already captured 'this'" }
 					    // { dg-error "'*this' capture only available with" "" { target c++14_down } .-1 }
-					    // { dg-error "explicit by-copy capture of 'this' redundant with by-copy capture default" "" { target c++17_down } .-2 }
+					    // { dg-error "explicit by-copy capture of 'this' with by-copy capture default only available with" "" { target c++17_down } .-2 }
     auto r = [=, this, this] { return a; };// { dg-error "already captured 'this'" }
-					   // { dg-error "explicit by-copy capture of 'this' redundant with by-copy capture default" "" { target c++17_down } .-1 }
+					   // { dg-error "explicit by-copy capture of 'this' with by-copy capture default only available with" "" { target c++17_down } .-1 }
     auto s = [=, *this, this] { return a; };// { dg-error "already captured 'this'" }
 					    // { dg-error "'*this' capture only available with" "" { target c++14_down } .-1 }
-					    // { dg-error "explicit by-copy capture of 'this' redundant with by-copy capture default" "" { target c++17_down } .-2 }
+					    // { dg-error "explicit by-copy capture of 'this' with by-copy capture default only available with" "" { target c++17_down } .-2 }
     auto t = [=, *this, *this] { return a; };// { dg-error "already captured 'this'" }
 					     // { dg-error "'*this' capture only available with" "" { target c++14_down } .-1 }
     auto u = [&, this, *this] { return a; };// { dg-error "already captured 'this'" }
diff --git a/gcc/testsuite/g++.dg/cpp1z/lambda-this8.C b/gcc/testsuite/g++.dg/cpp1z/lambda-this8.C
new file mode 100644
index 00000000000..b87ae0af62a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/lambda-this8.C
@@ -0,0 +1,10 @@
+// PR c++/100493
+// { dg-do compile { target c++17 } }
+// { dg-options "" }
+
+struct A {
+  int m;
+  void f() {
+    [=, this] { };
+  }
+};
diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C b/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C
index 3e00e68e906..bc54a4c895d 100644
--- a/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C
+++ b/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C
@@ -1,6 +1,6 @@
 // P0806R2
 // { dg-do compile { target c++17 } }
-// { dg-options "" }
+// { dg-options "-pedantic" }
 
 struct X {
   int x;
