lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 99464a8b 1/2: Sidestep a UBSAN complaint with


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 99464a8b 1/2: Sidestep a UBSAN complaint with gcc-12.0
Date: Thu, 18 Aug 2022 13:06:59 -0400 (EDT)

branch: master
commit 99464a8b474fc2dfd2f971326fbbf52c866323c1
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Sidestep a UBSAN complaint with gcc-12.0
---
 calendar_date.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/calendar_date.cpp b/calendar_date.cpp
index a472b047..320c1937 100644
--- a/calendar_date.cpp
+++ b/calendar_date.cpp
@@ -75,6 +75,7 @@ namespace
                 << " is outside the range [1, 12]."
                 << LMI_FLUSH
                 ;
+            throw "Unreachable--silences a compiler diagnostic.";
             }
         int n_days = month_lengths[month - 1];
         if(leap_year && 2 == month)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]