-Ldf: Log Predefined Defines to File

Group

OUTPUT

Scope

Compilation Unit

Syntax
  -Ldf[=<file>] 
  
Arguments

<file>: filename for the log file, default is predef.h.

Default

Default <file> is predef.h.

Defines

None

Pragmas

None

Description

The -Ldf option causes the Compiler to generate a text file that contains a list of the compiler-defined #define. The default filename of predef.h may be changed (for example, -Ldf="myfile.h"). The Compiler generates the file in the directory specified by the TEXTPATH environment variable (refer TEXTPATH: Text File Path). The defines written to this file depend on the actual Compiler option settings (such as type size settings or ANSI compliance).

Note: The defines specified by the command line ( -D: Macro Definition option) are not included.

This option may be very useful for SQA. With this option it is possible to document every #define used to compile all sources.

Note: This option only has an effect when a file is compiled, otherwise it has no meaning.
Example

The following listing lists the contents of a file containing define directives.

Listing: Displays the Contents of a File Containing Define Directives


-Ldf This generates the `predef.h' filewith the following content:

/* resolved by preprocessor: __LINE__ */

/* resolved by preprocessor: __FILE__ */

/* resolved by preprocessor: __DATE__ */

/* resolved by preprocessor: __TIME__ */

#define __STDC__ 0

#define __VERSION__ 5004

#define __VERSION_STR__ "V-5.0.4"

#define __SMALL__

#define __PTR_SIZE_2__

#define __BITFIELD_LSBIT_FIRST__

#define __BITFIELD_MSBYTE_FIRST__

...
See also

-D: Macro Definition