|
|
|
|
|
by YSFEJ4SWJUVU6
2418 days ago
|
|
>yes some compilers don't give warnings by default for implicit functions Broken or ancient compilers. That's as much C's fault as it's Intel's fault that Windows 10 doesn't run on Pentium MMX. Implicit functions are not part of C; they were gotten rid of back in 1999! |
|
I have to disagree about implicit functions not being a part of C anymore. I've yet to see one generate an error; this is optional, and frequently not used. I'm including brand new, state of the art compilers, even (default) gcc. Of course, not even emitting a warning is bananas.
I confirmed this, with the following snippet:
// start fail.c
int fail = 0;
// end fail.c
int main(void)
{
}gcc --std=c99 -g main.c fail.c -o main.exe && gdb main.exe -ex run
# Cmd line junk, however a warning was emitted for implicit function "fail"
Program received signal SIGSEGV, Segmentation fault.
0x00407020 in fail ()