Function type names cannot be used as the operand of the typeof operator.
Clang and LLVM permit it: https://godbolt.org/z/Txo3Ez3K9
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 (int (int)) *opf;
int foo(int);
typeof (int (int)) foo; // syntax error
typeof (int (int)) *pfoo; // syntax error
typeof (int (*)(int)) pfoo; // OK
Exact command used to run SDCC on this sample code:
sdcc bug.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.