[all-commits] [llvm/llvm-project] 7326e9: flang: fix backtrace build on FreeBSD (#120297)
Brooks Davis via All-commits
all-commits at lists.llvm.org
Thu Jan 2 09:06:51 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7326e903d72ba390a6368ff3e9eb2ab2251a1b13
https://github.com/llvm/llvm-project/commit/7326e903d72ba390a6368ff3e9eb2ab2251a1b13
Author: Brooks Davis <brooks at one-eyed-alien.net>
Date: 2025-01-02 (Thu, 02 Jan 2025)
Changed paths:
M flang/runtime/stop.cpp
Log Message:
-----------
flang: fix backtrace build on FreeBSD (#120297)
FreeBSD's libexecinfo defines backtrace with a size_t for the size
argument and return type. This almost certainly doesn't make sense, but
what's done is done so cast the output to allow compilation. Otherwise
we get:
.../flang/runtime/stop.cpp:165:13: error: non-constant-expression cannot
be narrowed from type 'size_t' (aka 'unsigned long') to 'int' in
initializer list [-Wc++11-narrowing]
165 | int nptrs{backtrace(buffer, MAX_CALL_STACK)};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list