This is the mail archive of the gcc@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]

Re: [PATCH] Deprecate -frepo option.


On 6/21/19 1:58 PM, Jakub Jelinek wrote:
> On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
>> On 6/21/19 1:47 PM, Jonathan Wakely wrote:
>>> On Fri, 21 Jun 2019 at 11:40, Martin Liška wrote:
>>>> Yes, I would be fine to deprecate that for GCC 10.1
>>>
>>> Would it be appropriate to issue a warning in GCC 10.x if the option is used?
>>
>> Sure. With the patch attached one will see:
>>
>> $ gcc -frepo /tmp/main.cc -c
>> gcc: warning: switch ‘-frepo’ is no longer supported
>>
>> I'm sending patch that also removes -frepo tests from test-suite.
>> I've been testing the patch.
> 
> IMHO for just deprecation of an option you don't want to remove it from the
> testsuite, just match the warning it will generate in those tests, and
> I'm not convinced you want to remove it from the documentation (rather than
> just saying in the documentation that the option is deprecated and might be
> removed in a later GCC version).

Agree with you. I'm sending updated version of the patch.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Martin

> 
> 	Jakub
> 

>From 2eeaa3bbe9cacf4d3d407797e38c00e062c6bfd5 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Fri, 21 Jun 2019 14:18:11 +0200
Subject: [PATCH] Deprecate -frepo option.

gcc/ChangeLog:

2019-06-21  Martin Liska  <mliska@suse.cz>

	* doc/extend.texi: Note that -frepo might
	be removed in the future.
	* doc/invoke.texi: Likewise.

gcc/c-family/ChangeLog:

2019-06-21  Martin Liska  <mliska@suse.cz>

	* c.opt: Deprecate -frepo.

gcc/testsuite/ChangeLog:

2019-06-21  Martin Liska  <mliska@suse.cz>

	* g++.dg/parse/repo1.C: Add new warning for the deprecated
	option -frepo.
	* 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.opt                               | 2 +-
 gcc/doc/extend.texi                              | 2 ++
 gcc/doc/invoke.texi                              | 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 | 3 ++-
 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 +
 22 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 572cf186262..963c651019d 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1732,7 +1732,7 @@ ObjC ObjC++ LTO Var(flag_replace_objc_classes)
 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime.
 
 frepo
-C++ ObjC++
+C++ ObjC++ Deprecated
 Enable automatic template instantiation.
 
 frtti
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index f2619e12f93..4495d2787e8 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -24510,6 +24510,8 @@ conflicts if multiple libraries try to provide the same instantiations.
 For greater control, use explicit instantiation as described in the next
 option.
 
+The option is deprecated and might be removed in a later GCC release.
+
 @item
 @opindex fno-implicit-templates
 Compile your code with @option{-fno-implicit-templates} to disable the
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index eaef4cd63d2..75f772f1856 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2722,6 +2722,8 @@ Enable automatic template instantiation at link time.  This option also
 implies @option{-fno-implicit-templates}.  @xref{Template
 Instantiation}, for more information.
 
+The option is deprecated and might be removed in a later GCC release.
+
 @item -fno-rtti
 @opindex fno-rtti
 @opindex frtti
diff --git a/gcc/testsuite/g++.dg/parse/repo1.C b/gcc/testsuite/g++.dg/parse/repo1.C
index efadd58723e..b213d81f6d6 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 "switch '-frepo' is no longer supported" "" { 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..ea4947f65f2 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 "switch '-frepo' is no longer supported" "" { 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..5ff786f77db 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 "switch '-frepo' is no longer supported" "" { 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..7aa705494e1 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 "switch '-frepo' is no longer supported" "" { 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..5e074787f77 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 "switch '-frepo' is no longer supported" "" { 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..f8ef41b80d9 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 "switch '-frepo' is no longer supported" "" { 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..fda3fe3b931 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 "switch '-frepo' is no longer supported" "" { 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..0a2976356c0 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 "switch '-frepo' is no longer supported" "" { 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..1116b5b65fd 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 "switch '-frepo' is no longer supported" "" { 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..f043b24fb05 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 "switch '-frepo' is no longer supported" "" { 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..f89beefba57 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 "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/template/repo8.C b/gcc/testsuite/g++.dg/template/repo8.C
index c51592c9349..3082f27213f 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 "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/template/repo9.C b/gcc/testsuite/g++.dg/template/repo9.C
index 7ddc6bf56d3..463429e57f7 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 "switch '-frepo' is no longer supported" "" { 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..866f02ace20 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
@@ -1,7 +1,8 @@
 // { dg-do link }
-// { dg-options "-frepo -Werror" }
+// { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { 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..309e8bde8f2 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 "switch '-frepo' is no longer supported" "" { 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..7c9dd2d97cf 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 "switch '-frepo' is no longer supported" "" { 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..81cf2866a67 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 "switch '-frepo' is no longer supported" "" { 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..42e3bea5cab 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 "switch '-frepo' is no longer supported" "" { 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..2d028d3b328 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 "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 template <class T>
 struct S {
-- 
2.21.0


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