build : enable more non-default compiler warnings (#3200)

This commit is contained in:
Cebtenzzre
2023-09-28 17:41:44 -04:00
committed by GitHub
parent 0ccfc62a96
commit bc39553c90
16 changed files with 285 additions and 267 deletions

8
ggml.h
View File

@@ -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.
//