Inline function readoptarg(), defined in .c file(asaik, it's a good practice to define inline functions in headers), causes undefined reference with newer gcc 5+, because it switched from -std=gnu89 to -std=c11 by default
runguard.c:(.text+0x13cd): undefined reference to `readoptarg'
runguard.c:(.text+0x1432): undefined reference to `readoptarg'
runguard.c:(.text+0x1497): undefined reference to `readoptarg'
runguard.c:(.text+0x1538): undefined reference to `readoptarg'
collect2: error: ld returned 1 exit status
Thanks Sergey. I've removed the inlining of that function. [runguard.c is from the domjudge package; I see the latest version doesn't have any inline functions, either.]
Inline function readoptarg(), defined in .c file(asaik, it's a good practice to define inline functions in headers), causes undefined reference with newer gcc 5+, because it switched from -std=gnu89 to -std=c11 by default
Workaround: set -std=gnu89 manually.