Illegal instruction error Positioning---ignoring the cost of compile-time warnings

Source: Internet
Author: User

In the original computer's Linux C + + program can run correctly, but changed a machine to run a fatal error, the program is directly dropped, error prompts as follows:

Illegal instruction (core dumped)

The main reason for the error is that we take a look at the compile prompt, warning as follows:

/home/xxx/src/aa. CPP:621:1: Warning:       control reaches end of nonfunction [-wreturn- Type]} ^

Careful review of the code found that the function is less return value, the pain is very, actually compiled also passed, just a warning.

This tells us an important fact: the compile-time warning is very important!

Resources

[1]. A low-level illegal instruction wrong position------ignore compile-time warnings to double-pay.

Illegal instruction error Positioning---ignoring the cost of compile-time warnings

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.