Skip to content

Commit

Permalink
cmake,make: add clang atomic-implicit-seq-cst warning (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers authored Jul 24, 2022
1 parent dae194a commit da89068
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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

0 comments on commit da89068

Please sign in to comment.