codereport / jsource

J Language Source Code. Livestream links ⬇️
https://www.youtube.com/playlist?list=PLVFrD1dmDdvfVhYLU_iKkV67X9XqCJLWe
Other
38 stars 20 forks source link

Compile with GCC 10+ #126

Closed nathanesau closed 3 years ago

nathanesau commented 3 years ago

Re. Goals "Compile with GCC 10+"

# CMakeLists.txt
# add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Werror>)

For reference, the warnings list is here.

# https://pastebin.com/raw/F4fsDiEW
ninja -C build > warnings.txt

About the warnings:

If we can come up with a strategy to resolve the warning "cast between incompatible function types", we are basically done.

About my system:

# gcc (GCC) 10.2.0
# Copyright (C) 2020 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.  There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gcc --version

# Linux manjaro-linux 5.9.16-1-MANJARO #1 SMP PREEMPT Mon Dec 21 22:00:46 UTC 2020 x86_64 GNU/Linux
uname -a
juntuu commented 3 years ago

We would like to keep -Werror (see #90), so, to get it building there would be two options:

In this case disabling the cast-function-type warning would be better in my opinion, as it is not high priority and would generate lot of warnings.

Also, sequence-point and unused-macros should already be excluded from errors, so those are only warnings.

Sebanisu commented 3 years ago

Last night I pulled main and it wouldn't compile anymore I wonder if this is why. It was late so I couldn't look into it. I'm also using GCC 10.2.