microsoft / jericho

A learning environment for man-made Interactive Fiction games.
GNU General Public License v2.0
253 stars 42 forks source link

Fix type errors against compiler errors #69

Closed wookayin closed 2 months ago

wookayin commented 2 months ago

Problem: The code can't build with modern versions of gcc and clang due to compiler errors (e.g., especially on arm64 macOS).

Mainly there are three issues:

Solution:

wookayin commented 2 months ago

@microsoft-github-policy-service agree

MarcCote commented 2 months ago

That is great. I'll check it out and make all tests pass and that everything is fine with other build environments.

MarcCote commented 2 months ago

@wookayin can you tell me which version of gcc and clang you are using? The compilation seems to be passing (granted with a lot of warnings) on this runner (macos14-arm64) https://github.com/microsoft/jericho/actions/runs/8853947959/job/24315904384?pr=71

wookayin commented 2 months ago

In one of my environments:

$ which -a gcc clang

gcc: aliased to nocorrect gcc
/usr/bin/gcc
/usr/bin/clang

$ gcc --version       # or clang --version too

Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

macOS 14.4.1 (23E224), XCode 15.3. I didn't have the CC or CFLAGS env variables set.

MarcCote commented 2 months ago

Thanks again. Will make a new release tomorrow.