diff --git a/include/etl/pool.h b/include/etl/pool.h index b06c9078..baf15a62 100644 --- a/include/etl/pool.h +++ b/include/etl/pool.h @@ -352,8 +352,9 @@ namespace etl // Initialise another one if necessary. if (items_initialised < MAX_SIZE) { - uintptr_t p = reinterpret_cast(p_buffer + (items_initialised * ITEM_SIZE)); - *reinterpret_cast(p) = p + ITEM_SIZE; + char* p = p_buffer + (items_initialised * ITEM_SIZE); + char* np = p + ITEM_SIZE; + *reinterpret_cast(p) = np; ++items_initialised; } @@ -585,7 +586,7 @@ namespace etl // The pool element. union Element { - uintptr_t next; ///< Pointer to the next free element. + char* next; ///< Pointer to the next free element. char value[TYPE_SIZE_]; ///< Storage for value type. typename etl::type_with_alignment::type dummy; ///< Dummy item to get correct alignment. }; diff --git a/include/etl/version.h b/include/etl/version.h index 5117d5ae..e678618d 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 14 #define ETL_VERSION_MINOR 34 -#define ETL_VERSION_PATCH 0 +#define ETL_VERSION_PATCH 1 #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_W ETL_STRINGIFY(ETL_VERSION_MAJOR) L"." ETL_STRINGIFY(ETL_VERSION_MINOR) L"." ETL_STRINGIFY(ETL_VERSION_PATCH) diff --git a/support/Release notes.txt b/support/Release notes.txt index ed723b61..589409aa 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +14.34.1 +Fixed strict aliasing bug for -O3 optimisation in etl::pool + =============================================================================== 14.34.0 Fix alternate STL utility.h for ARM6