Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake,make: add clang atomic-implicit-seq-cst warning #453

Merged
merged 1 commit into from
Jul 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ endif()


if(CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wshorten-64-to-32)
add_compile_options(-Wshorten-64-to-32 -Watomic-implicit-seq-cst)
# Ensure struct mem is aligned (used as fat pointer)
set_source_files_properties(src/mem/mem.c PROPERTIES COMPILE_FLAGS -Wpadded)
endif()
Expand Down
1 change: 1 addition & 0 deletions mk/re.mk
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ CFLAGS += -Wold-style-definition
CFLAGS += -Wvla # Avoid insecure variable-length arrays
ifeq ($(CC_NAME), clang)
CFLAGS += -Wshorten-64-to-32
CFLAGS += -Watomic-implicit-seq-cst
endif

CFLAGS += -g
Expand Down