BenHanson / parsertl14

C++14 version of parsertl
32 stars 4 forks source link

ebnf_tables.hpp Compilation error in gcc12.2.1 #5

Closed almostless closed 11 months ago

almostless commented 1 year ago

/tmp/parle/lib/parsertl14/parsertl/ebnf_tables.hpp:83:9: error: narrowing conversion of '-1' from 'int' to 'char' [-Wnarrowing] 83 | }; | ^ /tmp/parle/lib/parsertl14/parsertl/ebnf_tables.hpp:89:9: error: narrowing conversion of '-3' from 'int' to 'char' [-Wnarrowing] 89 | }; | ^ /tmp/parle/lib/parsertl14/parsertl/ebnf_tables.hpp:93:9: error: narrowing conversion of '-7' from 'int' to 'char' [-Wnarrowing] 93 | }; | ^ /tmp/parle/lib/parsertl14/parsertl/ebnf_tables.hpp:107:9: error: narrowing conversion of '-1' from 'int' to 'char' [-Wnarrowing] 107 | }; | ^ make: *** [Makefile:208: parle.lo] Error 1

/tmp/parle # gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-alpine-linux-musl/12.2.1/lto-wrapper Target: aarch64-alpine-linux-musl Configured with: /home/buildozer/aports/main/gcc/src/gcc-12-20220924/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=aarch64-alpine-linux-musl --host=aarch64-alpine-linux-musl --target=aarch64-alpine-linux-musl --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-languages=c,c++,d,objc,go,fortran,ada --with-arch=armv8-a --with-abi=lp64 --disable-libquadmath --disable-libssp --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues --with-system-zlib --with-linker-hash-style=gnu --with-pkgversion='Alpine 12.2.1_git20220924-r4' Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4)

BenHanson commented 1 year ago

I have switched them to int8_t and uint8_t. Hopefully that solves this issue.