This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

函数返回问题

你好,关于CCS_TMS570LS31x_FPU_SafeRTOS_Library_Demo这个Demo中的部分函数,我在CCS5.3中编译调试,我发现如果定义一个函数比如int xx(){};这样一个空函数,这个函数默认的返回值是1.是不是?如果是的话,这是不是跟编译器有关?

  • Hi duan,

    根据C语言的标准,定义非void的函数,必须要有返回值,要不然在编译是会报错。

    不是很明白,你所述的是什么情况,能够详细描述一下。

    你所选用的编译器是哪个版本(非CCS版本)。

    Regards,

    Jay