diff --git a/enzyme/CMakeLists.txt b/enzyme/CMakeLists.txt index 06b64dce6073..fc7768b4eb44 100644 --- a/enzyme/CMakeLists.txt +++ b/enzyme/CMakeLists.txt @@ -13,7 +13,7 @@ add_definitions(-DENZYME_VERSION_MAJOR=${ENZYME_MAJOR_VERSION}) add_definitions(-DENZYME_VERSION_MINOR=${ENZYME_MINOR_VERSION}) add_definitions(-DENZYME_VERSION_PATCH=${ENZYME_PATCH_VERSION}) -SET(CMAKE_CXX_FLAGS "-Wall -fPIC -fno-rtti ${CMAKE_CXX_FLAGS} -Werror=unused-variable") +SET(CMAKE_CXX_FLAGS "-Wall -fPIC -fno-rtti ${CMAKE_CXX_FLAGS} -Werror=unused-variable -Werror=dangling-else") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -ggdb") SET(CMAKE_CXX_FLAGS_RELEASE "-O2") diff --git a/enzyme/Enzyme/AdjointGenerator.h b/enzyme/Enzyme/AdjointGenerator.h index 51ca0a1491f5..58571b29d78a 100644 --- a/enzyme/Enzyme/AdjointGenerator.h +++ b/enzyme/Enzyme/AdjointGenerator.h @@ -1105,12 +1105,12 @@ class AdjointGenerator } MaybeAlign align; - if (prevalign) + if (prevalign) { if (start % prevalign->value() == 0) align = prevalign; else align = Align(1); - + } //! Storing a floating point value if (Type *FT = dt.isFloat()) { //! Only need to update the reverse function