Next: , Previous: Using gnatprep, Up: Preprocessing Using gnatprep


14.2 Switches for gnatprep

-b
Causes both preprocessor lines and the lines deleted by preprocessing to be replaced by blank lines in the output source file, preserving line numbers in the output file.
-c
Causes both preprocessor lines and the lines deleted by preprocessing to be retained in the output source as comments marked with the special string "–! ". This option will result in line numbers being preserved in the output file.
-Dsymbol=value
Defines a new symbol, associated with value. If no value is given on the command line, then symbol is considered to be True. This switch can be used in place of a definition file.
-r
Causes a Source_Reference pragma to be generated that references the original input file, so that error messages will use the file name of this original file. The use of this switch implies that preprocessor lines are not to be removed from the file, so its use will force -b mode if -c has not been specified explicitly.

Note that if the file to be preprocessed contains multiple units, then it will be necessary to gnatchop the output file from gnatprep. If a Source_Reference pragma is present in the preprocessed file, it will be respected by gnatchop -r so that the final chopped files will correctly refer to the original input source file for gnatprep.

-s
Causes a sorted list of symbol names and values to be listed on the standard output file.
-u
Causes undefined symbols to be treated as having the value FALSE in the context of a preprocessor test. In the absence of this option, an undefined symbol in a #if or #elsif test will be treated as an error.

Note: if neither -b nor -c is present, then preprocessor lines and deleted lines are completely removed from the output, unless -r is specified, in which case -b is assumed.