There cannot be spaces between macro names and parentheses!

Source: Internet
Author: User

One day, I wrote a simple inline assembly script, but the actual compilation cannot be completed. It is basically the same as the 1.1 points of the original compilation, but others can compile the script, what I wrote is that compilation is not successful. the Assembly script is as follows: [cpp] # undef BYTE_COPY_FWD # define BYTE_COPY_FWD (dst, src, len) \ do {\ asm volatile (\ "cld \ n" \ "rep \ n" \ "movsb": \ "= D" (dst), "= S" (src): \ "0" (dst), "1" (src), "c" (len): \ "memory"); \} while (0) therefore, beyond compare2 was found to have the following inconsistencies: the first line is others', and the second line is that there is a space between the macro name and, compiled! The previous error message is as follows. We hope the error message here is useful to you. memcpy. cpp: 40: warning: left-hand operand of comma has no such tmemcpy. cpp: 40: warning: right-hand operand of comma has no such tmemcpy. cpp: 40: error: expected '; 'before' do'

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.