3 ms·
> However, in the specific context of stand-alone or freestanding programs, the "void main()" definition would be absolutely nonconsequential One possible cons
by tom_mellior 6y ago
> However, in the specific context of stand-alone or freestanding programs, the "void main()" definition would be absolutely nonconsequential
One possible consequence I can think of: If your program is safety-critical (or even otherwise) you might be interested in running static analysis or verification tools on it. These tools implement the C standard, so they would emit a diagnostic on the use of void main.
Other than that, sure, the language police will not come and break down your door. If your compiler's docs say that it accepts this construct with the meaning you want, it is indeed an inconsequential, though also completely unnecessary, deviation from the standard.