Neither function type names nor function pointer type names can be used as the operand of the typeof_unqual operator.
Clang and LLVM permit it: https://godbolt.org/z/vY3P4ds4o
I would expect SDCC to permit it too.
If this is not addressed then this method of declaring pointers to optional-qualified function types will be unavailable to SDCC users, e.g. _Optional typeof_unqual (int (int)) *opf;
(I'm not sure why anyone would use typeof_unqual instead of typeof, but the fact remains.)
int foo(int);
typeof_unqual (int (*)(int)) pfoo; // FATAL Compiler Internal Error
typeof_unqual (int (int)) foo; // FATAL Compiler Internal Error
typeof_unqual (int (int)) *pfoo; // FATAL Compiler Internal Error
Exact command used to run SDCC on this sample code:
sdcc --std=c23 bug2.c
SDCC version tested:
SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/r4k/r5k/r6k/sm83/tlcs90/ez80/z80n/r800/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502/mos65c02/f8/f8l TD- 4.5.15 #15966 (Linux)
published under GNU General Public License (GPL)
Also tested version 4.5.0 at Compiler Explorer.