Are "-D" (define) macros ever relevant to the compiler on already-preprocessed C/C++?

Do any C/C++ **compilers** (not preprocessors) ever consider-as-significant macros defined at the command-line? This question includes both user-defined macros and well-known (compiler-or-system-specific) macros. (I'm not asking about compiler-switches, but rather, only that SINGLE switch-to-define-macros at the command line.) For example, if you've already "pre-processed" the `myfile.cpp` to a `myfile.i`, and then want to compile that `myfile.i` to a `myfile.obj/myfile.o`, does it EVER make sense to have `-Dmacro` to define some "macro" at the command-line for the `myfile.i`==>`myfile.obj/myfile.o`? Similarly, does the **linker** EVER consider-as-significant macros (defined anywhere)?
No answer on this question is correct, because I can invalidate it by writing a compiler that contradicts the answer. Please refine your scope.

以上就是Are "-D" (define) macros ever relevant to the compiler on already-preprocessed C/C++?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HBuilder

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏