https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93926
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
I should have said without -Wextra the incompatible return type is silently
accepted. With -Wextra there is a warning:
$ gcc -S -Wall -Wextra -m32 pr93926.c
pr93926.c:1:10: warning: mismatch in return type of built-in function ‘malloc’;
expected ‘void *’ [-Wbuiltin-declaration-mismatch]
1 | long int malloc (int);
| ^~~~~~
pr93926.c:6:1: error: malloc attribute should be used for a function that
returns a pointer
6 | }
| ^