2 ms·
gcc has that warning as well (not enabled by default, but enabled with -Wall). However gcc does not have a warning that I'm supposed to write `int foo(void){}`
by vbezhenar 3y ago
gcc has that warning as well (not enabled by default, but enabled with -Wall).
However gcc does not have a warning that I'm supposed to write `int foo(void){}` (if we're talking about C) which is real issue.
- astrange 3y agoNot true anymore in C2x, () means (void) now. The missing return type is still an issue though.
- flohofwoe 3y agoAh right. Clang will warn if you actually try to call such a () function with arguments: https://www.godbolt.org/z/qEa55PdG9 https://www.godbolt.org/z/qEa55PdG9 Both GCC and MSVC don't care though.