On Mon, 2023-09-11 at 10:23 +0200, Andreas Schwab via Gcc-patches wrote:
> ../../gcc/analyzer/diagnostic-manager.cc: In function 'bool 
> ana::compatible_epath_p(const exploded_path*, const exploded_path*)':
> ../../gcc/analyzer/diagnostic-manager.cc:969:1: warning: control reaches end 
> of non-void function [-Wreturn-type]

Sorry about this; should be fixed by the following patch.

Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-4005-g59f6185b59f711.

gcc/analyzer/ChangeLog:
        * diagnostic-manager.cc (compatible_epath_p): Fix missing return.
---
 gcc/analyzer/diagnostic-manager.cc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gcc/analyzer/diagnostic-manager.cc 
b/gcc/analyzer/diagnostic-manager.cc
index a010f4ba1e1..b3da2a982f2 100644
--- a/gcc/analyzer/diagnostic-manager.cc
+++ b/gcc/analyzer/diagnostic-manager.cc
@@ -966,6 +966,14 @@ compatible_epath_p (const exploded_path *lhs_path,
       /* A superedge was found for only one of the two paths.  */
       return false;
     }
+
+  /* A superedge was found for only one of the two paths.  */
+  if (lhs_eedge_idx >= 0 || rhs_eedge_idx >= 0)
+    return false;
+
+  /* Both paths were drained up entirely.
+     No discriminant was found.  */
+  return true;
 }
 
 
-- 
2.26.3

Reply via email to