public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] riscv: fix error: control reaches end of non-void function
@ 2023-07-14  2:32 Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-07-14  2:32 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:14bbca22f1b1ae23f5124ac4a478fa2adf376f43

commit 14bbca22f1b1ae23f5124ac4a478fa2adf376f43
Author: Martin Liska <mliska@suse.cz>
Date:   Wed May 3 16:35:26 2023 +0200

    riscv: fix error: control reaches end of non-void function
    
    Fixes:
    gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type]
    66 |   [(set (attr "length") (const_int 4))])
       | ^
    
            PR target/109713
    
    gcc/ChangeLog:
    
            * config/riscv/sync.md: Add gcc_unreachable to a switch.

Diff:
---
 gcc/config/riscv/sync.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/config/riscv/sync.md b/gcc/config/riscv/sync.md
index 6e7c762ac57..9fc626267de 100644
--- a/gcc/config/riscv/sync.md
+++ b/gcc/config/riscv/sync.md
@@ -62,6 +62,8 @@
 	return "fence\tr,rw";
     else if (model == MEMMODEL_RELEASE)
 	return "fence\trw,w";
+    else
+	gcc_unreachable ();
   }
   [(set (attr "length") (const_int 4))])

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] riscv: fix error: control reaches end of non-void function
@ 2023-05-25 23:16 Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-05-25 23:16 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0fe478de5e7515bf455b4377f101706eaf610d50

commit 0fe478de5e7515bf455b4377f101706eaf610d50
Author: Martin Liska <mliska@suse.cz>
Date:   Wed May 3 16:35:26 2023 +0200

    riscv: fix error: control reaches end of non-void function
    
    Fixes:
    gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type]
    66 |   [(set (attr "length") (const_int 4))])
       | ^
    
            PR target/109713
    
    gcc/ChangeLog:
    
            * config/riscv/sync.md: Add gcc_unreachable to a switch.

Diff:
---
 gcc/config/riscv/sync.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/config/riscv/sync.md b/gcc/config/riscv/sync.md
index 6e7c762ac57..9fc626267de 100644
--- a/gcc/config/riscv/sync.md
+++ b/gcc/config/riscv/sync.md
@@ -62,6 +62,8 @@
 	return "fence\tr,rw";
     else if (model == MEMMODEL_RELEASE)
 	return "fence\trw,w";
+    else
+	gcc_unreachable ();
   }
   [(set (attr "length") (const_int 4))])

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-14  2:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-14  2:32 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] riscv: fix error: control reaches end of non-void function Jeff Law
  -- strict thread matches above, loose matches on Subject: below --
2023-05-25 23:16 Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).