fd0238cb6b
gcc-8 adds a new warning controlled by -Wcast-function-type, which is implied on by Rebirth's default options. This new warning rejects attempts to reinterpret_cast between function pointer types. While this might provide some value when the function pointer was derived by taking the address of a properly declared function provided elsewhere in the same program, it is wrong when the function pointer is returned by an external library call, such as GetProcAddress, which always returns a placeholder type instead of the actual type of the target function. Switch to using a union with type-punning, which achieves the same effect as the cast, but does not count as a cast, and therefore does not provoke the warning. References: <https://github.com/dxx-rebirth/dxx-rebirth/issues/388> |
||
---|---|---|
.. | ||
2d | ||
3d | ||
arch | ||
editor | ||
include | ||
main | ||
maths | ||
mem | ||
misc | ||
texmap | ||
ui | ||
unittest |