Backslash newline at end of file warning

后端 未结 6 1634
猫巷女王i
猫巷女王i 2020-12-20 12:59

With this code:

#include 


int main(int argc, char *argv[])
{

  return 0;
}


/** run2: A macro to call a function. */
#define run2( functi         


        
6条回答
  •  甜味超标
    2020-12-20 13:27

    The problem is that there's no new-line character in the end of your code. C++ Standard §2.1/2 says:

    <...>If a source file that is not empty does not end in a new-line character, or ends in a new-line character immediately preceded by a backslash character, the behavior is undefined.

提交回复
热议问题