Closed jwinarske closed 1 week ago
somehow older clang doesn't accept initializing the Asset
struct: https://godbolt.org/z/xr19hYWY5
clang 15 does accept it, but with -pedantic
logs that it is a GNU extension
Yep I see it with clang 10
ninja: Entering directory `buildDir/'
[82/113] Compiling C++ object src/libdrmpp.so.p/input_pointer.cc.o
FAILED: src/libdrmpp.so.p/input_pointer.cc.o
/usr/bin/clang++ -Isrc/libdrmpp.so.p -Isrc -I../src -I../include/drmpp -I. -I.. -I../subprojects/libdisplay-info/include -I../subprojects/libliftoff/include -I../subprojects/rapidjson/include -I../subprojects/spdlog/include -Isubprojects/spdlog/__CMake_build -I../subprojects/spdlog/__CMake_build -Isubprojects/spdlog -I../subprojects/spdlog -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O0 -g -Wno-unused-parameter -Wno-missing-field-initializers -fPIC -DSPDLOG_COMPILED_LIB -DSPDLOG_NO_EXCEPTIONS -DSPDLOG_NO_THREAD_ID -DFMT_EXCEPTIONS=0 -isystem/usr/include/libdrm -MD -MQ src/libdrmpp.so.p/input_pointer.cc.o -MF src/libdrmpp.so.p/input_pointer.cc.o.d -o src/libdrmpp.so.p/input_pointer.cc.o -c ../src/input/pointer.cc
In file included from ../src/input/pointer.cc:23:
../include/drmpp/input/default_left_ptr.h:34:5: error: initialization of flexible array member is not allowed
{
^
../include/drmpp/input/asset.h:25:13: note: initialized flexible array member 'data' is here
uint8_t data[];
^
1 error generated.
[83/113] Compiling C++ object src/libdrmpp.so.p/input_keyboard.cc.o
FAILED: src/libdrmpp.so.p/input_keyboard.cc.o
/usr/bin/clang++ -Isrc/libdrmpp.so.p -Isrc -I../src -I../include/drmpp -I. -I.. -I../subprojects/libdisplay-info/include -I../subprojects/libliftoff/include -I../subprojects/rapidjson/include -I../subprojects/spdlog/include -Isubprojects/spdlog/__CMake_build -I../subprojects/spdlog/__CMake_build -Isubprojects/spdlog -I../subprojects/spdlog -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O0 -g -Wno-unused-parameter -Wno-missing-field-initializers -fPIC -DSPDLOG_COMPILED_LIB -DSPDLOG_NO_EXCEPTIONS -DSPDLOG_NO_THREAD_ID -DFMT_EXCEPTIONS=0 -isystem/usr/include/libdrm -MD -MQ src/libdrmpp.so.p/input_keyboard.cc.o -MF src/libdrmpp.so.p/input_keyboard.cc.o.d -o src/libdrmpp.so.p/input_keyboard.cc.o -c ../src/input/keyboard.cc
In file included from ../src/input/keyboard.cc:21:
../include/drmpp/input/default_xkeymap.h:33:5: error: initialization of flexible array member is not allowed
{
^
../include/drmpp/input/asset.h:25:13: note: initialized flexible array member 'data' is here
uint8_t data[];
^
1 error generated.
cc @ardera