GCC 9 throws function cast warnings about fastdelegate
mikepurvis opened this issue · comments
I see this building our firmwares using gcc-arm-none-eabi=15:9-2019-q4-0ubuntu1
, the version currently in Ubuntu Focal:
/usr/arm-none-eabi/include/stm32plus-040006/event/fd/FastDelegate.h:318:22: error: cast between incompatible pointer to member types from 'void (adc_helpers::AdcDmaDriver<stm32plus::Dma2Channel2Stream0<stm32plus::AdcDmaFeature<stm32plus::PeripheralTraits<stm32plus::PERIPHERAL_ADC3>, true, 131072, 0>, stm32plus::DmaInterruptFeature<2, 0> >, 0>::*)(stm32plus::DmaEventType)' to 'void (fastdelegate::detail::GenericClass::*)()' [-Werror=cast-function-type]
cc1plus: all warnings being treated as errors
Looks like that file is vendored in from an upstream that no longer exists; I can't find any newer versions of it that have been patched for this, and I'm not sure what the proper fix would look like.
Note that with cppcheck turned out there are also a ton of new warnings, especially about uninitialized members and absense of the override
keyword.
For now we're simply passing -Wno-cast-function-type
in order to move forward with our migration. I attempted to cast through void*
and the compiler was still getting hung up on this, so I'm not sure what the proper resolution would be.