On 2022-7-27 02:51 , Christopher Jones wrote:
clang is correct in this case, gcc is being sloppy.Basically you cannot return a value, from a function declared as void… fairly basic stuff really..
I believe the standard requires printing a diagnostic message, but not necessarily refusing to compile the program. Not erroring out on code this obviously broken really isn't doing anyone any favours though.
- Josh