Theabs()function is declared in<stdlib.h>which you've not included.abs()函数在<stdlib.h>声明,你没有包含它。 GCC 4.9.2 didn't complain because the default compilation mode was C89/C90 (-std=gnu89) and functions did not need to be declared before being used in C89 as long as they ...
GCC 4.9.2没有抱怨,因为默认编译模式是C89 / C90( -std=gnu89),并且只要它们返回一个int ,就不需要在C89中使用之前声明函数,但默认的编译模式是在GCC 5.1.0中更改为C11( -stdd=gnu11)(参见发行说明),在使用之前必须声明(或定义)C11函数。Try to include the <stdlib.h> in your code. 尝试在代码中包...