When the type of a paramter is missing in the prototype of a function returning a pointer, e.g.
extern void *f(g);
sdcc segfaults. I see this using sdcc 3.8.4 #10788 on debian GNU/Linux, but the issue has been around for a while.
I also see the segfault for an old-style function:
extern void *f(g)
int g;
{
}
Philipp
Both original forms avoid SIGSEGV; the old-style definition only warns about its unused parameter.
https://godbolt.org/z/6M6EY9ohT
Regression test added in [r17052]
Related
Commit: [r17052]