I've updated the GCC compiler from 10.3 to 11.1. I'm using it to compile for target CPU cortex-m4 with FPU.
In my code there is a lot of functions marked as interrupt with the __attribute__((interrupt))
for example:
__attribute__((interrupt)) void systick_isr_vector() {
}
Unfortunately, after update, the compiler has started to generate warnings for interrupt attribute
../unittests_entry.cpp:138:52: warning: FP registers might be clobbered despite 'interrupt' attribute: compile with '-mgeneral-regs-only' [-Wattributes]
138 | __attribute__((interrupt)) void systick_isr_vector() {
|
The question that appeared here was how to turn this warning off. I don't want to disable -Wattributes
I want to disable warning only for this particular case instead.
What is more why GCC tries to prohibit using FPU context on the interrupt service routine? It is allowed in the interrupt context on the ARMv7m architecture and supported in the hardware.
I suppose it is a bug in the GCC?