Skip to content

Commit 7329c8f

Browse files
committed
src: make UNREACHABLE variadic
Eliminate warning C4003 - not enough arguments for function-like macro invocation 'UNREACHABLE' PR-URL: #27877 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
1 parent c91a90b commit 7329c8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ void DumpBacktrace(FILE* fp);
181181
#endif
182182

183183

184-
#define UNREACHABLE(expr) \
185-
ERROR_AND_ABORT("Unreachable code reached: " expr)
184+
#define UNREACHABLE(...) \
185+
ERROR_AND_ABORT("Unreachable code reached" __VA_OPT__(": ") __VA_ARGS__)
186186

187187
// TAILQ-style intrusive list node.
188188
template <typename T>

0 commit comments

Comments
 (0)