| |||
| Home > Compiler Command-line Options > Command-line options > --interleave | |||
This option interleaves C or C++ source code line by line
as comments within an assembly listing generated using the --asm option
or -S option.
The action of --interleave depends on the
combination of options used:
Table 3. Compiling with the ---interleave option
| Compiler option | Action |
|---|---|
--asm --interleave | Writes a listing to a file of the disassembly of the compiled source, interleaving the source code with the disassembly. The
link step is also performed, unless the The disassembly is written to a text file whose
name defaults to the name of the input file with the filename extension |
-S --interleave | Writes a listing to a file of the disassembly of the compiled source, interleaving the source code with the disassembly. The
disassembly is written to a text file whose name defaults to the name
of the input file with the filename extension |
You cannot re-assemble an assembly
listing generated with --asm --interleave or -S --interleave.
Preprocessed source files contain #line directives.
When compiling preprocessed files using --asm --interleave or -S
--interleave, the compiler searches for the original files indicated
by any #line directives, and uses the correct
lines from those files. This ensures that compiling a preprocessed
file gives exactly the same output and behavior as if the original
files were compiled.
If the compiler cannot find the original files, it is unable
to interleave the source. Therefore, if you have preprocessed source
files with #line directives, but the original unpreprocessed
files are not present, you must remove all the #line directives
before you compile with --interleave.