This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).


Hi.

This is a patch for GCC9 branch that warns when a user
tries to use the option.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin
>From 6dcfb47ca7f7674c2913ba45e85f11426311bb4e Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Wed, 10 Jul 2019 15:20:28 +0200
Subject: [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).

gcc/c-family/ChangeLog:

2019-07-10  Martin Liska  <mliska@suse.cz>

	PR c++/91125
	* c-opts.c (c_common_handle_option): Warn the -frepo
	will be removed in the future.

gcc/testsuite/ChangeLog:

2019-07-10  Martin Liska  <mliska@suse.cz>

	PR c++/91125
	* g++.dg/parse/repo1.C: Add scan for the new warning.
	* g++.dg/rtti/repo1.C: Likewise.
	* g++.dg/template/repo1.C: Likewise.
	* g++.dg/template/repo10.C: Likewise.
	* g++.dg/template/repo11.C: Likewise.
	* g++.dg/template/repo2.C: Likewise.
	* g++.dg/template/repo3.C: Likewise.
	* g++.dg/template/repo4.C: Likewise.
	* g++.dg/template/repo5.C: Likewise.
	* g++.dg/template/repo6.C: Likewise.
	* g++.dg/template/repo7.C: Likewise.
	* g++.dg/template/repo8.C: Likewise.
	* g++.dg/template/repo9.C: Likewise.
	* g++.old-deja/g++.pt/instantiate4.C: Likewise.
	* g++.old-deja/g++.pt/instantiate6.C: Likewise.
	* g++.old-deja/g++.pt/repo1.C: Likewise.
	* g++.old-deja/g++.pt/repo2.C: Likewise.
	* g++.old-deja/g++.pt/repo3.C: Likewise.
	* g++.old-deja/g++.pt/repo4.C: Likewise.
---
 gcc/c-family/c-opts.c                            | 2 ++
 gcc/testsuite/g++.dg/parse/repo1.C               | 1 +
 gcc/testsuite/g++.dg/rtti/repo1.C                | 1 +
 gcc/testsuite/g++.dg/template/repo1.C            | 1 +
 gcc/testsuite/g++.dg/template/repo10.C           | 1 +
 gcc/testsuite/g++.dg/template/repo11.C           | 1 +
 gcc/testsuite/g++.dg/template/repo2.C            | 1 +
 gcc/testsuite/g++.dg/template/repo3.C            | 1 +
 gcc/testsuite/g++.dg/template/repo4.C            | 1 +
 gcc/testsuite/g++.dg/template/repo5.C            | 1 +
 gcc/testsuite/g++.dg/template/repo6.C            | 1 +
 gcc/testsuite/g++.dg/template/repo7.C            | 1 +
 gcc/testsuite/g++.dg/template/repo8.C            | 1 +
 gcc/testsuite/g++.dg/template/repo9.C            | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo1.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo2.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo3.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo4.C        | 1 +
 20 files changed, 21 insertions(+)

diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 454cfa0ee3e..d0ea93af57e 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -501,6 +501,8 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
       flag_use_repository = value;
       if (value)
 	flag_implicit_templates = 0;
+      warning (0, "%<-frepo%> is deprecated and will be removed "
+	       "in a future release");
       break;
 
     case OPT_ftabstop_:
diff --git a/gcc/testsuite/g++.dg/parse/repo1.C b/gcc/testsuite/g++.dg/parse/repo1.C
index efadd58723e..dacf59a494b 100644
--- a/gcc/testsuite/g++.dg/parse/repo1.C
+++ b/gcc/testsuite/g++.dg/parse/repo1.C
@@ -1,5 +1,6 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 extern "C" inline void f() {}
 
diff --git a/gcc/testsuite/g++.dg/rtti/repo1.C b/gcc/testsuite/g++.dg/rtti/repo1.C
index f72a9730ab9..36a8f086763 100644
--- a/gcc/testsuite/g++.dg/rtti/repo1.C
+++ b/gcc/testsuite/g++.dg/rtti/repo1.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 #include <typeinfo>
 template<int>
diff --git a/gcc/testsuite/g++.dg/template/repo1.C b/gcc/testsuite/g++.dg/template/repo1.C
index 342993eca14..fe18c467cf4 100644
--- a/gcc/testsuite/g++.dg/template/repo1.C
+++ b/gcc/testsuite/g++.dg/template/repo1.C
@@ -1,6 +1,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 struct A {
   A();
diff --git a/gcc/testsuite/g++.dg/template/repo10.C b/gcc/testsuite/g++.dg/template/repo10.C
index c92f7a52b60..42497a2810a 100644
--- a/gcc/testsuite/g++.dg/template/repo10.C
+++ b/gcc/testsuite/g++.dg/template/repo10.C
@@ -3,6 +3,7 @@
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
 // { dg-final cleanup-repo-files }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template<typename T>
 struct Foo
diff --git a/gcc/testsuite/g++.dg/template/repo11.C b/gcc/testsuite/g++.dg/template/repo11.C
index 5cabfd452ed..54edad05f9e 100644
--- a/gcc/testsuite/g++.dg/template/repo11.C
+++ b/gcc/testsuite/g++.dg/template/repo11.C
@@ -3,6 +3,7 @@
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
 // { dg-final cleanup-repo-files }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <typename H> struct J { J(H) {} };
 template <unsigned long, typename...> struct K;
diff --git a/gcc/testsuite/g++.dg/template/repo2.C b/gcc/testsuite/g++.dg/template/repo2.C
index e3224155e97..8e875ede03f 100644
--- a/gcc/testsuite/g++.dg/template/repo2.C
+++ b/gcc/testsuite/g++.dg/template/repo2.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <int __inst>
 struct __Atomicity_lock
diff --git a/gcc/testsuite/g++.dg/template/repo3.C b/gcc/testsuite/g++.dg/template/repo3.C
index cfa38a9e435..365bb285e4e 100644
--- a/gcc/testsuite/g++.dg/template/repo3.C
+++ b/gcc/testsuite/g++.dg/template/repo3.C
@@ -1,6 +1,7 @@
 // { dg-options "-frepo -DF='a'" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <typename A, typename B> void f () {}
 template <typename A, typename B> void g () { f<int,int>(); }
diff --git a/gcc/testsuite/g++.dg/template/repo4.C b/gcc/testsuite/g++.dg/template/repo4.C
index 64882a8c694..5a2ccd800fc 100644
--- a/gcc/testsuite/g++.dg/template/repo4.C
+++ b/gcc/testsuite/g++.dg/template/repo4.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 namespace { 
   struct Foo {}; 
diff --git a/gcc/testsuite/g++.dg/template/repo5.C b/gcc/testsuite/g++.dg/template/repo5.C
index e45ade7df48..527cf961adb 100644
--- a/gcc/testsuite/g++.dg/template/repo5.C
+++ b/gcc/testsuite/g++.dg/template/repo5.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template< typename T, T N > struct integral_c {
   static const T value = N;
diff --git a/gcc/testsuite/g++.dg/template/repo6.C b/gcc/testsuite/g++.dg/template/repo6.C
index 4b7178e2ad3..4778313eb59 100644
--- a/gcc/testsuite/g++.dg/template/repo6.C
+++ b/gcc/testsuite/g++.dg/template/repo6.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template<typename T>
 class A
diff --git a/gcc/testsuite/g++.dg/template/repo7.C b/gcc/testsuite/g++.dg/template/repo7.C
index dafb3f5597c..15af3476d10 100644
--- a/gcc/testsuite/g++.dg/template/repo7.C
+++ b/gcc/testsuite/g++.dg/template/repo7.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/template/repo8.C b/gcc/testsuite/g++.dg/template/repo8.C
index c51592c9349..96d34993b0a 100644
--- a/gcc/testsuite/g++.dg/template/repo8.C
+++ b/gcc/testsuite/g++.dg/template/repo8.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/template/repo9.C b/gcc/testsuite/g++.dg/template/repo9.C
index 7ddc6bf56d3..69e3ee474d4 100644
--- a/gcc/testsuite/g++.dg/template/repo9.C
+++ b/gcc/testsuite/g++.dg/template/repo9.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <typename C> struct A
 {
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
index d7a8cab31c5..97838689d38 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo -Werror" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-error "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 
 // Submitted by Melissa O'Neill <oneill@cs.sfu.ca>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
index 6726b216673..2c7eb2cc7eb 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Simplified from testcase by Erez Louidor Lior <s3824888@techst02.technion.ac.il>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo1.C b/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
index bdfe306b4ad..57b2dafc614 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Bug: g++ complains about duplicate explicit instantiations with -frepo.
 // From Jason Merrill <jason@cygnus.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
index a8d8b1217a1..1b96155f9b3 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Test that collect2 isn't confused by GNU ld's "In function `foo':" message.
 // Contributed by Jason Merrill <jason@cygnus.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo3.C b/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
index 2f62139660e..69b765fdf2a 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Test that we properly generate the vtable and such for C.
 // Contributed by scott snyder <snyder@fnal.gov>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo4.C b/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
index 84575cd9469..c239a409255 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <class T>
 struct S {
-- 
2.22.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]