Skip to content

Commit

Permalink
Disable Clang warning -Wexit-time-destructors.
Browse files Browse the repository at this point in the history
This warns on `static const std::map<...>`.

re2c is single-threaded, so there's no risk of race conditions when one
thread is terminating and the other one tries to access the object.
  • Loading branch information
skvadrik committed Nov 14, 2024
1 parent efc527c commit 555331f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/Re2cCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# re2c uses C++11, not C++98
"-Wno-c++98-compat"
"-Wno-c++98-compat-pedantic"
# re2c is single-threaded => no danger of race conditions
"-Wno-exit-time-destructors"
)
try_cxxflag("-fdiagnostics-color=always")

Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ TRY_CXXFLAG([-Weverything], m4_join([ ],
[-Wno-c++98-compat-pedantic],
[-Wno-unsafe-pointer-arithmetic],
[-Wno-unsafe-buffer-usage],
[-Wno-exit-time-destructors], dnl re2c is single-threaded => no danger of race conditions
[-Wno-switch-enum]))


Expand Down

0 comments on commit 555331f

Please sign in to comment.