Sean Murthy · @smurthys
108 followers · 1113 posts · Server hachyderm.io

Forgive me if I should know this but I notice Compiler Explorer pgm output shows only the last byte of the value C++ pgm returns though the assembly shows a different 4-byte value being returned.

godbolt.org/z/Yx1nf9oar

Wandbox does the same: wandbox.org/permlink/llqGvLRGw

But running the exe on Windows after compiling with GCC on MinGW returns the complete value.

Is this an OS thing: Windows v Linux? Sorry me no Linux.

@compiler_explorer

#cpp #cplusplus #windows #linux #compilerexplorer #wandbox

Last updated 1 year ago