Fix compile error when using GCC on macOS

38 jobs for !2722 with fix-gcc-compuile-error-on-mac in 84 minutes and 10 seconds (queued for 8 seconds)
latest merge request