clang warns for using an uninitialized array during the
member-initialization-list, before the union constructor would have done
nothing. clang permits using the still-uninitialized array in the
constructor body, after the union constructor has done nothing.
The same code is generated both before and after this commit, but the
old code produces a warning and the new code is silent.
```
similar/main/physics.cpp:282:5: error: field 'a' is uninitialized when used here [-Werror,-Wuninitialized]
e(a.begin())
```
The comma was omitted to discourage putting anything after the last
element. This was fine when there were multiple elements, but with only
one value, the missing comma causes this not to be a tuple as intended.
Add a comma to fix the test. Add some additional comments on supported
C++ versions by gcc major version.
Recent code changes require use of return type deduction, which is only
standard in C++14 and later. Require C++14. In practice, this changes
nothing, because the minimum supported compiler versions were already
choosing C++14. This change rejects older compilers that were already
unsupported.
gcc-4.9 rejects defining a class with a reference member and no
constructor, even though the use of the class uses a
brace-initialization expression to set the reference at construction
time.
Fixes: fa654324ad ("Pass context to wall.cpp:cwframe, cw_removal_predicate")
When exactly four bytes remain, mvelib will attempt to compute a
past-the-end pointer. Some handlers will dereference this pointer
without rechecking the length. Adjust the header check to require a
non-empty body.
Reported-by: jwrdegoede <https://github.com/dxx-rebirth/dxx-rebirth/issues/413>