Email or username:

Password:

Forgot your password?
Top-level
aeva

@RAOF @beeoproblem @mdiluz if you're missing a main function other functions don't get promoted to main. I tested it out in godbolt earlier, what happens is the ret instruction in main gets optimized out, thus the program counter just advances to the next instruction in memory which is the other function. The entry points for main and the other function still exist.

1 comment
aeva

@RAOF @beeoproblem @mdiluz gcc and msvc both do what you'd expect. Clang and zig's c++ compiler both optimize away the loop and the return.

Go Up