From 51742a335956afcb5d435dfc787e1871d1d45859 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 5 Dec 2023 23:10:42 -0500 Subject: [PATCH] GCC has no __builtin_COLUMN --- sus/assertions/panic.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sus/assertions/panic.h b/sus/assertions/panic.h index 17dd24741..79e59636a 100644 --- a/sus/assertions/panic.h +++ b/sus/assertions/panic.h @@ -41,7 +41,12 @@ struct PanicLocation { constexpr static PanicLocation current( const char* file_name = __builtin_FILE(), unsigned line = __builtin_LINE(), - unsigned column = __builtin_COLUMN()) noexcept { + #if __has_builtin(__builtin_COLUMN) + unsigned column = __builtin_COLUMN() + #else + unsigned column = 0u + #endif + ) noexcept { return PanicLocation{ .file_name = file_name, .line = line,