gcc on windows generating garbage? windows vs linux

前端 未结 2 672
自闭症患者
自闭症患者 2021-01-23 09:31

I\'m trying to find out why in windows has so much more instructions for the same program than linux. So I just used int a=0xbeef; and printf(\"test\\n\");

2条回答
  •  日久生厌
    2021-01-23 10:15

    One notes that in the upper example the compiler is calling puts, while in the lower it is printf. I would suspect you have optimization on in the top example, but not on the lower example.

    It also might be a debug vs non-debug build.

提交回复
热议问题