Skip to content

Commit

Permalink
Fix previous commit on gcc 9 and 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Oct 13, 2024
1 parent 7b8bfda commit e12026f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
3 changes: 3 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ FLAGS += -Wall -Wno-strict-aliasing -fno-omit-frame-pointer -fvisibility=hidden
-Wno-comment -Wpointer-arith -Wundef
ifeq ($(USEGCC),1) # GCC bug #25509 (void)__attribute__((warn_unused_result))
FLAGS += -Wno-unused-result
# GCC is throwing warnings like `warning: 'int __builtin_memcmp_eq(const void*, const void*, long unsigned int)' specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807` in llvm's StringRef.h == seemingly because it doesn't realise the size can't be 0.
FLAGS += -Wno-stringop-overflow
FLAGS += -Wno-stringop-overread
endif
JCFLAGS += -Wold-style-definition -Wstrict-prototypes -Wc++-compat

Expand Down
11 changes: 0 additions & 11 deletions src/debuginfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ using namespace llvm;
#include "julia_assert.h"
#include "debug-registry.h"

#ifdef _COMPILER_GCC_
// GCC is throwing warnings like `warning: 'int __builtin_memcmp_eq(const void*, const void*, long unsigned int)' specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807` in llvm's StringRef.h == seemingly because it doesn't realise the size can't be 0.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overread"
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif

static JITDebugInfoRegistry *DebugRegistry = new JITDebugInfoRegistry;

static JITDebugInfoRegistry &getJITDebugRegistry() JL_NOTSAFEPOINT {
Expand Down Expand Up @@ -1651,7 +1644,3 @@ uint64_t jl_getUnwindInfo_impl(uint64_t dwAddr)
jl_unlock_profile();
return ipstart;
}

#ifdef _COMPILER_GCC_
#pragma GCC diagnostic pop
#endif

0 comments on commit e12026f

Please sign in to comment.