Skip to content

Commit

Permalink
GCC has no __builtin_COLUMN
Browse files Browse the repository at this point in the history
  • Loading branch information
danakj committed Dec 6, 2023
1 parent f61f103 commit 51742a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sus/assertions/panic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 51742a3

Please sign in to comment.