GCC function name conflict

前端 未结 3 1225
盖世英雄少女心
盖世英雄少女心 2021-01-13 06:43

I was having some problems with a sample code i was testing, since my abs function was not returning the correct result. abs(-2) was outputing -2 (this, by the way, is supos

3条回答
  •  无人及你
    2021-01-13 07:13

    Sounds a lot like this bug, which is from 2007 and noted as being fixed.

    You should of course try to compile without GCC's intrinics, i.e. pass -fno-builtin (or just -fno-builtin-abs to snipe out only abs()) when compiling.

提交回复
热议问题