What's the meaning of #line in C language?

前端 未结 6 1701
借酒劲吻你
借酒劲吻你 2021-02-01 03:27

What\'s the meaning of #line in the C language? Where would it be used?

6条回答
  •  有刺的猬
    2021-02-01 04:10

    It is mostly used to supply the file names and line numbers of a source file from which a C file (be it header or implementation) was created. Given that, the compiler would emit diagnostics that hint at the source file rather than at the generated file.

    Preprocessors also use this to hint at included headers in a preprocessed file that has these expanded.

提交回复
热议问题