diff options
author | Cebtenzzre <cebtenzzre@gmail.com> | 2023-09-28 17:41:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-28 17:41:44 -0400 |
commit | bc39553c901a91cfcb757863586250838c83eeab (patch) | |
tree | 507d1aedf8ad63e4ed84e37154de9abf31ba358a /ggml.h | |
parent | 0ccfc62a96a6b59a8faa14d1b350493f4cd51ae2 (diff) |
build : enable more non-default compiler warnings (#3200)
Diffstat (limited to 'ggml.h')
-rw-r--r-- | ggml.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -248,6 +248,14 @@ } \ } while (0) +#ifndef NDEBUG +#define GGML_UNREACHABLE() GGML_ASSERT(!"statement should not be reached") +#elif defined(__GNUC__) +#define GGML_UNREACHABLE() __builtin_unreachable() +#else +#define GGML_UNREACHABLE() ((void) 0) +#endif + // used to copy the number of elements and stride in bytes of tensors into local variables. // main purpose is to reduce code duplication and improve readability. // |