[v2] RISC-V: remove deprecate pic code model macro

Message ID 20220902203310.370711-1-vineetg@rivosinc.com
State New, archived
Headers
Series [v2] RISC-V: remove deprecate pic code model macro |

Commit Message

Vineet Gupta Sept. 2, 2022, 8:33 p.m. UTC
  Came across this deprecated symbol when looking around for
-mexplicit-relocs handling in code

Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
---
 gcc/config/riscv/riscv-c.cc               | 3 ---
 gcc/testsuite/gcc.target/riscv/predef-1.c | 3 ---
 gcc/testsuite/gcc.target/riscv/predef-2.c | 3 ---
 gcc/testsuite/gcc.target/riscv/predef-3.c | 3 ---
 gcc/testsuite/gcc.target/riscv/predef-4.c | 3 ---
 gcc/testsuite/gcc.target/riscv/predef-5.c | 3 ---
 gcc/testsuite/gcc.target/riscv/predef-6.c | 3 ---
 gcc/testsuite/gcc.target/riscv/predef-7.c | 3 ---
 gcc/testsuite/gcc.target/riscv/predef-8.c | 3 ---
 9 files changed, 27 deletions(-)
  

Comments

Andreas Schwab Sept. 2, 2022, 9:03 p.m. UTC | #1
On Sep 02 2022, Vineet Gupta wrote:

> diff --git a/gcc/config/riscv/riscv-c.cc b/gcc/config/riscv/riscv-c.cc
> index eb7ef09297e9..bba72cf77a82 100644
> --- a/gcc/config/riscv/riscv-c.cc
> +++ b/gcc/config/riscv/riscv-c.cc
> @@ -93,9 +93,6 @@ riscv_cpu_cpp_builtins (cpp_reader *pfile)
>        break;
>  
>      case CM_PIC:
> -      /* __riscv_cmodel_pic is deprecated, and will removed in next GCC release.
> -	 see https://github.com/riscv/riscv-c-api-doc/pull/11  */
> -      builtin_define ("__riscv_cmodel_pic");
>        /* FALLTHROUGH. */
>  
>      case CM_MEDANY:

If there is nothing left between the case labels the fallthrough comment
is no longer needed.
  

Patch

diff --git a/gcc/config/riscv/riscv-c.cc b/gcc/config/riscv/riscv-c.cc
index eb7ef09297e9..bba72cf77a82 100644
--- a/gcc/config/riscv/riscv-c.cc
+++ b/gcc/config/riscv/riscv-c.cc
@@ -93,9 +93,6 @@  riscv_cpu_cpp_builtins (cpp_reader *pfile)
       break;
 
     case CM_PIC:
-      /* __riscv_cmodel_pic is deprecated, and will removed in next GCC release.
-	 see https://github.com/riscv/riscv-c-api-doc/pull/11  */
-      builtin_define ("__riscv_cmodel_pic");
       /* FALLTHROUGH. */
 
     case CM_MEDANY:
diff --git a/gcc/testsuite/gcc.target/riscv/predef-1.c b/gcc/testsuite/gcc.target/riscv/predef-1.c
index 2e57ce6b3954..9dddc1849635 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-1.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-1.c
@@ -57,9 +57,6 @@  int main () {
 #endif
 #if defined(__riscv_cmodel_medany)
 #error "__riscv_cmodel_medlow"
-#endif
-#if defined(__riscv_cmodel_pic)
-#error "__riscv_cmodel_medlow"
 #endif
 
   return 0;
diff --git a/gcc/testsuite/gcc.target/riscv/predef-2.c b/gcc/testsuite/gcc.target/riscv/predef-2.c
index c85b3c9fd32a..755fe4ef7d8a 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-2.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-2.c
@@ -57,9 +57,6 @@  int main () {
 #endif
 #if !defined(__riscv_cmodel_medany)
 #error "__riscv_cmodel_medlow"
-#endif
-#if defined(__riscv_cmodel_pic)
-#error "__riscv_cmodel_medlow"
 #endif
 
   return 0;
diff --git a/gcc/testsuite/gcc.target/riscv/predef-3.c b/gcc/testsuite/gcc.target/riscv/predef-3.c
index 82a89d415809..513645351c09 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-3.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-3.c
@@ -57,9 +57,6 @@  int main () {
 #endif
 #if !defined(__riscv_cmodel_medany)
 #error "__riscv_cmodel_medany"
-#endif
-#if !defined(__riscv_cmodel_pic)
-#error "__riscv_cmodel_pic"
 #endif
 
   return 0;
diff --git a/gcc/testsuite/gcc.target/riscv/predef-4.c b/gcc/testsuite/gcc.target/riscv/predef-4.c
index 5868d39eb67a..76b6feec6b6f 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-4.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-4.c
@@ -57,9 +57,6 @@  int main () {
 #endif
 #if defined(__riscv_cmodel_medany)
 #error "__riscv_cmodel_medlow"
-#endif
-#if defined(__riscv_cmodel_pic)
-#error "__riscv_cmodel_medlow"
 #endif
 
   return 0;
diff --git a/gcc/testsuite/gcc.target/riscv/predef-5.c b/gcc/testsuite/gcc.target/riscv/predef-5.c
index 4b2bd3835061..54a51508afbd 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-5.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-5.c
@@ -57,9 +57,6 @@  int main () {
 #endif
 #if !defined(__riscv_cmodel_medany)
 #error "__riscv_cmodel_medlow"
-#endif
-#if defined(__riscv_cmodel_pic)
-#error "__riscv_cmodel_medlow"
 #endif
 
   return 0;
diff --git a/gcc/testsuite/gcc.target/riscv/predef-6.c b/gcc/testsuite/gcc.target/riscv/predef-6.c
index 8e5ea366bd5e..f61709f7bf32 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-6.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-6.c
@@ -57,9 +57,6 @@  int main () {
 #endif
 #if !defined(__riscv_cmodel_medany)
 #error "__riscv_cmodel_medany"
-#endif
-#if !defined(__riscv_cmodel_pic)
-#error "__riscv_cmodel_medpic"
 #endif
 
   return 0;
diff --git a/gcc/testsuite/gcc.target/riscv/predef-7.c b/gcc/testsuite/gcc.target/riscv/predef-7.c
index 0bde299aef1a..41217554c4db 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-7.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-7.c
@@ -57,9 +57,6 @@  int main () {
 #endif
 #if defined(__riscv_cmodel_medany)
 #error "__riscv_cmodel_medlow"
-#endif
-#if defined(__riscv_cmodel_pic)
-#error "__riscv_cmodel_medlow"
 #endif
 
   return 0;
diff --git a/gcc/testsuite/gcc.target/riscv/predef-8.c b/gcc/testsuite/gcc.target/riscv/predef-8.c
index 18aa591a6039..982056a53438 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-8.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-8.c
@@ -57,9 +57,6 @@  int main () {
 #endif
 #if !defined(__riscv_cmodel_medany)
 #error "__riscv_cmodel_medlow"
-#endif
-#if defined(__riscv_cmodel_pic)
-#error "__riscv_cmodel_medlow"
 #endif
 
   return 0;