mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 22:17:33 +02:00
Issue #466 - Prevent compiler warnings regarding Cyc_st_add and string comparisons
Were seeing newer versions of clang spamming warnings due to how we were comparing strings here.
This commit is contained in:
parent
e21735512e
commit
d3ab710bb4
2 changed files with 4 additions and 1 deletions
|
@ -8,6 +8,7 @@ Bug Fixes
|
|||
- Properly handle literal vectors at the top level of compiled code.
|
||||
- Properly escape C strings in compiled code to avoid trigraphs.
|
||||
- Eliminate clang compiler warnings referencing `EOF` when building the runtime.
|
||||
- Prevent warnings from the C compiler regarding string comparison for emitted code using `Cyc_st_add`.
|
||||
|
||||
## 0.30.0 - July 2, 2021
|
||||
|
||||
|
|
|
@ -723,8 +723,10 @@ object copy2heap(void *data, object obj);
|
|||
#define Cyc_st_add(data, frame) \
|
||||
{ \
|
||||
gc_thread_data *thd = (gc_thread_data *) data; \
|
||||
intptr_t p1 = (intptr_t)frame; \
|
||||
intptr_t p2 = (intptr_t)thd->stack_prev_frame; \
|
||||
/* Do not allow recursion to remove older frames */ \
|
||||
if ((void *)frame != (void *)thd->stack_prev_frame) { \
|
||||
if (p1 != p2) { \
|
||||
thd->stack_prev_frame = frame; \
|
||||
thd->stack_traces[thd->stack_trace_idx] = frame; \
|
||||
thd->stack_trace_idx = (thd->stack_trace_idx + 1) % MAX_STACK_TRACES; \
|
||||
|
|
Loading…
Add table
Reference in a new issue