Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A C/C++ preprocessor strips all comments, but generally keeps source lines at the same line numbers when you look at the preprocessor output. </p> <p>This is so that a compiler which reads the preprocessor output can print correct line numbers for error messages and warnings. </p> <p>Preprocessors usually also keep all empty lines as they are.</p> <p>You also have to strictly differentiate between multiline macros being removed from the source and when they get expanded. They always get removed <em>while keeping all linefeeds</em>. They always get replaced with <em>all linefeeds stripped</em>. Both are totally independent operations which have nothing to do with each other. </p> <p>In the old days a C preprocessor would produce its output always on stdout and the C compiler would read it from stdin. The preprocessor emits internal <code>#&lt;N&gt; "&lt;FILE&gt;"</code> statements which the C compiler interprets as 'line number N is following'. So the preprocessor could in theory do without emitting empty lines in the output. But in practice this <code>#&lt;N&gt; "&lt;FILE&gt;"</code> feature is only used for lines following <code>#include</code> statements.</p> <p>Today the preprocessor is built into the C compiler for performance, but you can still look at the intermediate result if explicitly requested.</p> <p>Note: See also the good comment below: The standard does not really specify how the text output of a preprocessor looks like in terms of white-spaces. The text output is implementation specific. There is quite some room for interpretation. What is defined is where at least one space character must be and that all tokes stay on their original lines (or get tagged with their original line) so that error messages make sense.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload