Commit 9fd547f
zephyr: sw_isr_table: Fix compilation error
The IRQ_DIRECT_CONNECT macro eventually uses _Z_ISR_DIRECT_TABLE_ENTRY,
which defines a function. IRQ_DIRECT_CONNECT is meant to be used
inside functions. While nested functions are supported as an extension
in GNU C, the nested function cannot have static storage.
https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html:
> A nested function always has no linkage. Declaring one with extern or
> static is erroneous.
./scripts/twister -c -s arch.interrupt.gen_isr_table_local.riscv --all
tests/kernel/gen_isr_table/src/main.c: In function
'gen_isr_table_test_build_time_direct_interrupt':
include/zephyr/sw_isr_table.h:197:41: error: invalid storage class for
function '__isr_table_entry_isr1_irq_2'
#define __MK_ISR_ELEMENT_NAME(func, id) __isr_table_entry_ ## func ## _irq_ ## id
^~~~~~~~~~~~~~~~~~
Issue zephyrproject-rtos#92194
Signed-off-by: Tom Hughes <[email protected]>1 parent 322da1d commit 9fd547f
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
248 | 249 | | |
249 | 250 | | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
| |||
0 commit comments