# HG changeset patch # User Jonas Hultén # Date 1711142354 -3600 # Fri Mar 22 22:19:14 2024 +0100 # Branch develop # Node ID 1ac325cbe82bacb073921292f873bc2070856038 # Parent ef0977f518cfe801dfa8d0be3b5690a5f1947e59 Fixed compile warnings in GCC. diff --git a/core/pch.h b/core/pch.h --- a/core/pch.h +++ b/core/pch.h @@ -20,7 +20,7 @@ #define LIKELY(x) __builtin_expect((x),1) #define UNLIKELY(x) __builtin_expect((x),0) #define forceinline inline __attribute__((always_inline)) - #define UNREACHABLE_CODE(x) + #define UNREACHABLE_CODE(x) __builtin_unreachable() #elif defined(_MSC_VER) #define LIKELY(x) x #define UNLIKELY(x) x diff --git a/jasm/pch.h b/jasm/pch.h --- a/jasm/pch.h +++ b/jasm/pch.h @@ -20,7 +20,7 @@ #define LIKELY(x) __builtin_expect((x),1) #define UNLIKELY(x) __builtin_expect((x),0) #define forceinline inline __attribute__((always_inline)) - #define UNREACHABLE_CODE(x) + #define UNREACHABLE_CODE(x) __builtin_unreachable() #define SINGLE_INHERITANCE #elif defined(_MSC_VER) #define LIKELY(x) x diff --git a/jasm/processor/processor.cpp b/jasm/processor/processor.cpp --- a/jasm/processor/processor.cpp +++ b/jasm/processor/processor.cpp @@ -200,6 +200,7 @@ case ProcessorType::Zilog80: return _z80.get(); } + UNREACHABLE_CODE(throw Exception("internal error")); } }