Feisikar I. mx6 cross-compilation tool chain BUG, I. mx6 compilation tool

Source: Internet
Author: User

Feisikar I. mx6 cross-compilation tool chain BUG, I. mx6 compilation tool

Recently, I made a project on the I. mx6 platform of Apsara stack. After coding and testing on I. mx6, I found that the return value of a function has been incorrect,

The Return Value Type of a function is "char". The returned value is '-2', And the return value is equal to the value of '0'.

It is found that the program cannot enter the wrong branch, and the problem is found only after repeated tests, because the system treats it as 254 when '-2' is returned.

Then I added a signed modifier to the front of the char to return '-2' correctly.

That is to say, the compiler tool of I. mx6 sets the 'Char 'type to 'unsigned char' by default, which is different from the default 'signed char' type of other compilers.

This is not a big bug. Record it to prevent further errors.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.