Skip to content

Resolve worrying GCC 12 warnings in Random

GCC 12 warns of storing the address of a local variable in class data for the Hurd160Engine and Hurd288Engine classes. Upon inspection, this appears to be a real problem that may affect engine seed and state, especially in optimized configurations.

This merge request resolves those problems by adding private class data for seed array storage in the expected format (0-terminated C-style array of long).

These changes have been tested with GCC 4.8.5/C++11, GCC 12.1/C++17 and Clang 14.0.6/C++17/libc++.

Merge request reports