<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, Jun 3, 2017 at 7:07 AM Boris Kolpackov <<a href="mailto:boris@codesynthesis.com">boris@codesynthesis.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> writes:<br>
<br>
> What difference are you expecting the -cpp-output to make to the<br>
> compilation?<br>
<br>
Make it a lot faster? ;-)<br>
<br>
Seriously, though, in my case I know that certain TU do not use the<br>
preprocessor. I do some optimizations at the build system level but<br>
also want to pass this information along to the compiler in case it<br>
wants to do some as well. It may not do any currently (e.g., because<br>
such preprocessed TU are virtually non-existent and its not worth the<br>
effort). But maybe it makes sense to "reserve" the name even if it's<br>
just an alias for 'c++-module'. But I am also happy to always pass<br>
'c++-module' (and perhaps 'c++' for consistency).<br>
<br>
Also, on the topic of expectations: I assume that such a preprocessed<br>
TU can still contain comments and line continuations. Clang's -cpp-output<br>
handles this but not GCC's (where I use -fdirectives-only to indicate<br>
that the source is only partially preprocessed).<br></blockquote><div><br>As an aside - Clang has -frewrite-includes that might be sufficiently similar for your needs. If you don't use this (& use full preprocessing) you will find that Clang's diagnostics differ between a preprocessed file being compiled and an unpreprocessed file being compiled (Clang uses macro information to decide whether to warn in some cases).<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Boris<br>
</blockquote></div></div>