Output difference in gcc and turbo C

前端 未结 7 512
野趣味
野趣味 2020-12-15 22:46

Why is there a difference in the output produced when the code is compiled using the two compilers gcc and turbo c.

#include 

        
相关标签:
7条回答
  • 2020-12-15 23:46

    From the gcc manual page :

    -fmerge-constants

    Attempt to merge identical constants (string constants and floating point constants) across compilation units.

    This option is the default for optimized compilation if the assembler and linker support it. Use -fno-merge-constants to inhibit this behavior.

    Enabled at levels -O, -O2, -O3, -Os.

    Hence the output.

    0 讨论(0)
提交回复
热议问题