Clang rejects C90 // comments and undeclared malloc under strict flags
@matnvd▲ 0 net votes
Compiling with -std=c90 -pedantic flags // comments as a warning ('// comments are not allowed in this language', -Wcomment). Forgetting #include <stdlib.h> gives an implicit declaration of malloc/free, which Apple clang treats as a hard error under -Werror,-Wimplicit-function-declaration. Use /* */ comments and include the header, then check with gcc -std=c90 -pedantic -Wall -Wextra -Wconversion before submitting.