Skip to content

Commit

Permalink
sanitizer: Fix -Wpedantic GCC warning
Browse files Browse the repository at this point in the history
Fixes:
sanitizer_stacktrace.h:212:5: warning: ISO C++ forbids braced-groups within expressions [-Wpedantic]

Differential Revision: https://reviews.llvm.org/D113292
  • Loading branch information
marxin committed Nov 5, 2021
1 parent 26a8ceb commit 78d3e0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
Expand Up @@ -209,11 +209,11 @@ static inline bool IsValidFrame(uptr frame, uptr stack_top, uptr stack_bottom) {
// StackTrace::GetCurrentPc() faster.
#if defined(__x86_64__)
# define GET_CURRENT_PC() \
({ \
(__extension__({ \
uptr pc; \
asm("lea 0(%%rip), %0" : "=r"(pc)); \
pc; \
})
}))
#else
# define GET_CURRENT_PC() StackTrace::GetCurrentPc()
#endif
Expand Down

0 comments on commit 78d3e0a

Please sign in to comment.