The version of speller.c that is used by check50 has an extra header #include <unistd.h> that is not in the problem set's distro version.
If a student happens to create a new function using a name that is an existing function in unistd.h, check50 will fail to compile with an error code of 2, due to the mismatched prototypes.
Example
extraheaders.c:4:6: error: conflicting types for 'read'
void read(char *);
^
/usr/include/unistd.h:371:16: note: previous declaration is here
extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
But the student will have no way to see this as it will compile fine in the codespace using the distro version of speller.c
@rongxin-liu Is that header actually required here? And if so, should it be added to the distro version? Or removed?
In either case, we should try to get the #includes in sync.
The version of
speller.c
that is used bycheck50
has an extra header#include <unistd.h>
that is not in the problem set's distro version.If a student happens to create a new function using a name that is an existing function in
unistd.h
,check50
will fail to compile with an error code of 2, due to the mismatched prototypes.Example
But the student will have no way to see this as it will compile fine in the codespace using the distro version of
speller.c
@rongxin-liu Is that header actually required here? And if so, should it be added to the distro version? Or removed?
In either case, we should try to get the
#include
s in sync.