<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div>---- On Thu, 11 May 2017 02:05:43 -0700 <b>Boris Kolpackov via cfe-dev <cfe-dev@lists.llvm.org></b> wrote ----<br></div><div class="zmail_extra"><div><br></div><blockquote style="border-left: 1px solid #cccccc; padding-left: 6px; margin:0 0 0 5px"><div><div>Also, has anyone seen/heard of any real-world issues with compiling<br></div><div>preprocessed source code?<br></div><div><br></div></div></blockquote></div><div><br>I think the short version of my answer is: There are pitfalls, but it may work well enough for your purposes. You may want to give your users the option to combine the preprocess and compile into a single step.<br></div><div><br>In theory, having separate preprocess and compile steps should work. A preprocessed C file is just like a non-preprocessed C file that happens not to use any preprocessor features. The C preprocessor is also used for other purposes than preprocessing C code. For example, on Unix-like systems, it is not uncommon to run assembly programs through the C preprocessor. So there is reason to believe that the C preprocessor will continue to be available to run separate from the C compiler, and that the C compiler will continue to grok files that come out of the C preprocessor. Similarly for C++.<br><br>Others have already pointed out some cases where things aren't quite that clean. I would like to add that, in my short experience working on Warp, I found that there is a lot of interdependency between the preprocessor and the compiler and the flags that are being passed to the compiler. For example, compilers like to define version macros and sometimes feature-test macros. Other macros end up being defined based on flags passed to the compiler. For example passing -mavx to gcc causes __AVX__ to be defined. So if you want to separate the preprocess step from the compile step, you have to make sure that everything that affects the preprocessor output matches between the preprocessor invocation and the compiler invocation.<br><br>Bob<br><br></div></div></body></html>