Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC 9 throws function cast warnings about fastdelegate #224

Open
mikepurvis opened this issue Apr 14, 2020 · 2 comments
Open

GCC 9 throws function cast warnings about fastdelegate #224

mikepurvis opened this issue Apr 14, 2020 · 2 comments

Comments

@mikepurvis
Copy link
Contributor

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.

@mikepurvis
Copy link
Contributor Author

Note that with cppcheck turned out there are also a ton of new warnings, especially about uninitialized members and absense of the override keyword.

@mikepurvis
Copy link
Contributor Author

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.

mhelmarc pushed a commit to mhelmarc/stm32plus that referenced this issue Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant