[1/2] RISC-V: Add quotes to #error messages

Message ID 6afb03099b118119ecca3dd8500e70ee9d523c6d.1692330726.git.research_trasio@irq.a4lg.com
State Unresolved
Headers
Series [1/2] RISC-V: Add quotes to #error messages |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Tsukasa OI Aug. 18, 2023, 3:52 a.m. UTC
  From: Tsukasa OI <research_trasio@irq.a4lg.com>

In commit 1aaf3a64e92a ("[PATCH] RISC-V: Deduplicate #error messages in
testsuite"), the author made a mistake to miss the test after adding
quotes around extension names.  To avoid future errors and for consistency
with other #error uses in the RISC-V testsuite, this commit quotes #error
messages where necessary to avoid current test case failures.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/zvkn.c: Quote #error messages.
	* gcc.target/riscv/zvkn-1.c: Ditto.
	* gcc.target/riscv/zvknc.c: Ditto.
	* gcc.target/riscv/zvknc-1.c: Ditto.
	* gcc.target/riscv/zvknc-2.c: Ditto.
	* gcc.target/riscv/zvkng.c: Ditto.
	* gcc.target/riscv/zvkng-1.c: Ditto.
	* gcc.target/riscv/zvkng-2.c: Ditto.
	* gcc.target/riscv/zvks.c: Ditto.
	* gcc.target/riscv/zvks-1.c: Ditto.
	* gcc.target/riscv/zvksc.c: Ditto.
	* gcc.target/riscv/zvksc-1.c: Ditto.
	* gcc.target/riscv/zvksc-2.c: Ditto.
	* gcc.target/riscv/zvksg.c: Ditto.
	* gcc.target/riscv/zvksg-1.c: Ditto.
	* gcc.target/riscv/zvksg-2.c: Ditto.
---
 gcc/testsuite/gcc.target/riscv/zvkn-1.c  | 10 +++++-----
 gcc/testsuite/gcc.target/riscv/zvkn.c    | 10 +++++-----
 gcc/testsuite/gcc.target/riscv/zvknc-1.c | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvknc-2.c | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvknc.c   | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvkng-1.c | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvkng-2.c | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvkng.c   | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvks-1.c  | 10 +++++-----
 gcc/testsuite/gcc.target/riscv/zvks.c    | 10 +++++-----
 gcc/testsuite/gcc.target/riscv/zvksc-1.c | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvksc-2.c | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvksc.c   | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvksg-1.c | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvksg-2.c | 14 +++++++-------
 gcc/testsuite/gcc.target/riscv/zvksg.c   | 14 +++++++-------
 16 files changed, 104 insertions(+), 104 deletions(-)


base-commit: 3709ca091bec43ee3203b96146585652c5d84728
  

Comments

Jeff Law Aug. 21, 2023, 1:32 p.m. UTC | #1
On 8/17/23 21:52, Tsukasa OI wrote:
> From: Tsukasa OI <research_trasio@irq.a4lg.com>
> 
> In commit 1aaf3a64e92a ("[PATCH] RISC-V: Deduplicate #error messages in
> testsuite"), the author made a mistake to miss the test after adding
> quotes around extension names.  To avoid future errors and for consistency
> with other #error uses in the RISC-V testsuite, this commit quotes #error
> messages where necessary to avoid current test case failures.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/riscv/zvkn.c: Quote #error messages.
> 	* gcc.target/riscv/zvkn-1.c: Ditto.
> 	* gcc.target/riscv/zvknc.c: Ditto.
> 	* gcc.target/riscv/zvknc-1.c: Ditto.
> 	* gcc.target/riscv/zvknc-2.c: Ditto.
> 	* gcc.target/riscv/zvkng.c: Ditto.
> 	* gcc.target/riscv/zvkng-1.c: Ditto.
> 	* gcc.target/riscv/zvkng-2.c: Ditto.
> 	* gcc.target/riscv/zvks.c: Ditto.
> 	* gcc.target/riscv/zvks-1.c: Ditto.
> 	* gcc.target/riscv/zvksc.c: Ditto.
> 	* gcc.target/riscv/zvksc-1.c: Ditto.
> 	* gcc.target/riscv/zvksc-2.c: Ditto.
> 	* gcc.target/riscv/zvksg.c: Ditto.
> 	* gcc.target/riscv/zvksg-1.c: Ditto.
> 	* gcc.target/riscv/zvksg-2.c: Ditto.
Thanks.  I've pushed both patches in this series to the trunk.
jeff
  

Patch

diff --git a/gcc/testsuite/gcc.target/riscv/zvkn-1.c b/gcc/testsuite/gcc.target/riscv/zvkn-1.c
index 84a3b577a496..23b255b47790 100644
--- a/gcc/testsuite/gcc.target/riscv/zvkn-1.c
+++ b/gcc/testsuite/gcc.target/riscv/zvkn-1.c
@@ -3,23 +3,23 @@ 
 /* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt" { target { rv32 } } } */
 
 #ifndef __riscv_zvkn
-#error Feature macro for `Zvkn' not defined
+#error "Feature macro for `Zvkn' not defined"
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro for `Zvkned' not defined
+#error "Feature macro for `Zvkned' not defined"
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro for `Zvknhb' not defined
+#error "Feature macro for `Zvknhb' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvkn.c b/gcc/testsuite/gcc.target/riscv/zvkn.c
index b42c1881b628..0047ebdede6f 100644
--- a/gcc/testsuite/gcc.target/riscv/zvkn.c
+++ b/gcc/testsuite/gcc.target/riscv/zvkn.c
@@ -3,23 +3,23 @@ 
 /* { dg-options "-march=rv32gc_zvkn" { target { rv32 } } } */
 
 #ifndef __riscv_zvkn
-#error Feature macro for `Zvkn' not defined
+#error "Feature macro for `Zvkn' not defined"
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro for `Zvkned' not defined
+#error "Feature macro for `Zvkned' not defined"
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro for `Zvknhb' not defined
+#error "Feature macro for `Zvknhb' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvknc-1.c b/gcc/testsuite/gcc.target/riscv/zvknc-1.c
index 5c456a6add78..d8a84c021180 100644
--- a/gcc/testsuite/gcc.target/riscv/zvknc-1.c
+++ b/gcc/testsuite/gcc.target/riscv/zvknc-1.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt_zvbc" { target { rv32 } } } */
 
 #ifndef __riscv_zvknc
-#error Feature macro for `Zvknc' not defined
+#error "Feature macro for `Zvknc' not defined"
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro for `Zvkn' not defined
+#error "Feature macro for `Zvkn' not defined"
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro for `Zvkned' not defined
+#error "Feature macro for `Zvkned' not defined"
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro for `Zvknhb' not defined
+#error "Feature macro for `Zvknhb' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro for `Zvbc' not defined
+#error "Feature macro for `Zvbc' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvknc-2.c b/gcc/testsuite/gcc.target/riscv/zvknc-2.c
index fbedbf336367..36cc6335d135 100644
--- a/gcc/testsuite/gcc.target/riscv/zvknc-2.c
+++ b/gcc/testsuite/gcc.target/riscv/zvknc-2.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvkn_zvbc" { target { rv32 } } } */
 
 #ifndef __riscv_zvknc
-#error Feature macro for `Zvknc' not defined
+#error "Feature macro for `Zvknc' not defined"
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro for `Zvkn' not defined
+#error "Feature macro for `Zvkn' not defined"
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro for `Zvkned' not defined
+#error "Feature macro for `Zvkned' not defined"
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro for `Zvknhb' not defined
+#error "Feature macro for `Zvknhb' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro for `Zvbc' not defined
+#error "Feature macro for `Zvbc' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvknc.c b/gcc/testsuite/gcc.target/riscv/zvknc.c
index 826e36ad4d9c..a177f17fbd7a 100644
--- a/gcc/testsuite/gcc.target/riscv/zvknc.c
+++ b/gcc/testsuite/gcc.target/riscv/zvknc.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvknc" { target { rv32 } } } */
 
 #ifndef __riscv_zvknc
-#error Feature macro for `Zvknc' not defined
+#error "Feature macro for `Zvknc' not defined"
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro for `Zvkn' not defined
+#error "Feature macro for `Zvkn' not defined"
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro for `Zvkned' not defined
+#error "Feature macro for `Zvkned' not defined"
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro for `Zvknhb' not defined
+#error "Feature macro for `Zvknhb' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro for `Zvbc' not defined
+#error "Feature macro for `Zvbc' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvkng-1.c b/gcc/testsuite/gcc.target/riscv/zvkng-1.c
index c1424127d433..d996b42af00f 100644
--- a/gcc/testsuite/gcc.target/riscv/zvkng-1.c
+++ b/gcc/testsuite/gcc.target/riscv/zvkng-1.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt_zvkg" { target { rv32 } } } */
 
 #ifndef __riscv_zvkng
-#error Feature macro for `Zvkng' not defined
+#error "Feature macro for `Zvkng' not defined"
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro for `Zvkn' not defined
+#error "Feature macro for `Zvkn' not defined"
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro for `Zvkned' not defined
+#error "Feature macro for `Zvkned' not defined"
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro for `Zvknhb' not defined
+#error "Feature macro for `Zvknhb' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro for `Zvkg' not defined
+#error "Feature macro for `Zvkg' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvkng-2.c b/gcc/testsuite/gcc.target/riscv/zvkng-2.c
index 0150dcaabe60..00199992d5c6 100644
--- a/gcc/testsuite/gcc.target/riscv/zvkng-2.c
+++ b/gcc/testsuite/gcc.target/riscv/zvkng-2.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvkn_zvkg" { target { rv32 } } } */
 
 #ifndef __riscv_zvkng
-#error Feature macro for `Zvkng' not defined
+#error "Feature macro for `Zvkng' not defined"
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro for `Zvkn' not defined
+#error "Feature macro for `Zvkn' not defined"
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro for `Zvkned' not defined
+#error "Feature macro for `Zvkned' not defined"
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro for `Zvknhb' not defined
+#error "Feature macro for `Zvknhb' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro for `Zvkg' not defined
+#error "Feature macro for `Zvkg' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvkng.c b/gcc/testsuite/gcc.target/riscv/zvkng.c
index 20cf09890c86..4605faf3c6cc 100644
--- a/gcc/testsuite/gcc.target/riscv/zvkng.c
+++ b/gcc/testsuite/gcc.target/riscv/zvkng.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvkng" { target { rv32 } } } */
 
 #ifndef __riscv_zvkng
-#error Feature macro for `Zvkng' not defined
+#error "Feature macro for `Zvkng' not defined"
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro for `Zvkn' not defined
+#error "Feature macro for `Zvkn' not defined"
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro for `Zvkned' not defined
+#error "Feature macro for `Zvkned' not defined"
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro for `Zvknhb' not defined
+#error "Feature macro for `Zvknhb' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro for `Zvkg' not defined
+#error "Feature macro for `Zvkg' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvks-1.c b/gcc/testsuite/gcc.target/riscv/zvks-1.c
index 30d12539a9fb..a576cdb0476f 100644
--- a/gcc/testsuite/gcc.target/riscv/zvks-1.c
+++ b/gcc/testsuite/gcc.target/riscv/zvks-1.c
@@ -3,23 +3,23 @@ 
 /* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt" { target { rv32 } } } */
 
 #ifndef __riscv_zvks
-#error Feature macro for `Zvks' not defined
+#error "Feature macro for `Zvks' not defined"
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro for `Zvksed' not defined
+#error "Feature macro for `Zvksed' not defined"
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro for `Zvksh' not defined
+#error "Feature macro for `Zvksh' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvks.c b/gcc/testsuite/gcc.target/riscv/zvks.c
index 4af3a2a96ae9..d31b2610c202 100644
--- a/gcc/testsuite/gcc.target/riscv/zvks.c
+++ b/gcc/testsuite/gcc.target/riscv/zvks.c
@@ -3,23 +3,23 @@ 
 /* { dg-options "-march=rv32gc_zvks" { target { rv32 } } } */
 
 #ifndef __riscv_zvks
-#error Feature macro for `Zvks' not defined
+#error "Feature macro for `Zvks' not defined"
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro for `Zvksed' not defined
+#error "Feature macro for `Zvksed' not defined"
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro for `Zvksh' not defined
+#error "Feature macro for `Zvksh' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvksc-1.c b/gcc/testsuite/gcc.target/riscv/zvksc-1.c
index b547ae8efe2d..3b76e6cea706 100644
--- a/gcc/testsuite/gcc.target/riscv/zvksc-1.c
+++ b/gcc/testsuite/gcc.target/riscv/zvksc-1.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt_zvbc" { target { rv32 } } } */
 
 #ifndef __riscv_zvksc
-#error Feature macro for `Zvksc' not defined
+#error "Feature macro for `Zvksc' not defined"
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro for `Zvks' not defined
+#error "Feature macro for `Zvks' not defined"
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro for `Zvksed' not defined
+#error "Feature macro for `Zvksed' not defined"
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro for `Zvksh' not defined
+#error "Feature macro for `Zvksh' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro for `Zvbc' not defined
+#error "Feature macro for `Zvbc' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvksc-2.c b/gcc/testsuite/gcc.target/riscv/zvksc-2.c
index d0623bbf16c3..b95e34ec6e46 100644
--- a/gcc/testsuite/gcc.target/riscv/zvksc-2.c
+++ b/gcc/testsuite/gcc.target/riscv/zvksc-2.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvks_zvbc" { target { rv32 } } } */
 
 #ifndef __riscv_zvksc
-#error Feature macro for `Zvksc' not defined
+#error "Feature macro for `Zvksc' not defined"
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro for `Zvks' not defined
+#error "Feature macro for `Zvks' not defined"
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro for `Zvksed' not defined
+#error "Feature macro for `Zvksed' not defined"
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro for `Zvksh' not defined
+#error "Feature macro for `Zvksh' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro for `Zvbc' not defined
+#error "Feature macro for `Zvbc' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvksc.c b/gcc/testsuite/gcc.target/riscv/zvksc.c
index f712aed7b8f9..983f1aa89ec9 100644
--- a/gcc/testsuite/gcc.target/riscv/zvksc.c
+++ b/gcc/testsuite/gcc.target/riscv/zvksc.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvksc" { target { rv32 } } } */
 
 #ifndef __riscv_zvksc
-#error Feature macro for `Zvksc' not defined
+#error "Feature macro for `Zvksc' not defined"
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro for `Zvks' not defined
+#error "Feature macro for `Zvks' not defined"
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro for `Zvksed' not defined
+#error "Feature macro for `Zvksed' not defined"
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro for `Zvksh' not defined
+#error "Feature macro for `Zvksh' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro for `Zvbc' not defined
+#error "Feature macro for `Zvbc' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvksg-1.c b/gcc/testsuite/gcc.target/riscv/zvksg-1.c
index ed1e4f73dfec..e6b30552e4ca 100644
--- a/gcc/testsuite/gcc.target/riscv/zvksg-1.c
+++ b/gcc/testsuite/gcc.target/riscv/zvksg-1.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt_zvkg" { target { rv32 } } } */
 
 #ifndef __riscv_zvksg
-#error Feature macro for `Zvksg' not defined
+#error "Feature macro for `Zvksg' not defined"
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro for `Zvks' not defined
+#error "Feature macro for `Zvks' not defined"
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro for `Zvksed' not defined
+#error "Feature macro for `Zvksed' not defined"
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro for `Zvksh' not defined
+#error "Feature macro for `Zvksh' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro for `Zvkg' not defined
+#error "Feature macro for `Zvkg' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvksg-2.c b/gcc/testsuite/gcc.target/riscv/zvksg-2.c
index 4e6df2d55f84..2475e8bba1a3 100644
--- a/gcc/testsuite/gcc.target/riscv/zvksg-2.c
+++ b/gcc/testsuite/gcc.target/riscv/zvksg-2.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvks_zvkg" { target { rv32 } } } */
 
 #ifndef __riscv_zvksg
-#error Feature macro for `Zvksg' not defined
+#error "Feature macro for `Zvksg' not defined"
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro for `Zvks' not defined
+#error "Feature macro for `Zvks' not defined"
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro for `Zvksed' not defined
+#error "Feature macro for `Zvksed' not defined"
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro for `Zvksh' not defined
+#error "Feature macro for `Zvksh' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro for `Zvkg' not defined
+#error "Feature macro for `Zvkg' not defined"
 #endif
 
 int
diff --git a/gcc/testsuite/gcc.target/riscv/zvksg.c b/gcc/testsuite/gcc.target/riscv/zvksg.c
index e8a33f47ba41..4db9b5d6b9b1 100644
--- a/gcc/testsuite/gcc.target/riscv/zvksg.c
+++ b/gcc/testsuite/gcc.target/riscv/zvksg.c
@@ -3,31 +3,31 @@ 
 /* { dg-options "-march=rv32gc_zvksg" { target { rv32 } } } */
 
 #ifndef __riscv_zvksg
-#error Feature macro for `Zvksg' not defined
+#error "Feature macro for `Zvksg' not defined"
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro for `Zvks' not defined
+#error "Feature macro for `Zvks' not defined"
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro for `Zvksed' not defined
+#error "Feature macro for `Zvksed' not defined"
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro for `Zvksh' not defined
+#error "Feature macro for `Zvksh' not defined"
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro for `Zvbb' not defined
+#error "Feature macro for `Zvbb' not defined"
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro for `Zvkt' not defined
+#error "Feature macro for `Zvkt' not defined"
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro for `Zvkg' not defined
+#error "Feature macro for `Zvkg' not defined"
 #endif
 
 int