-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 is predef.h, but may be changed (e.g., -Ldf="myfile.h"). The file is generated in the directory specified by the TEXTPATH: Text File Path environment variable. The defines written to this file depend on the actual Compiler option settings (e.g., 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 which was used to compile all sources.

Note: This option only has an effect if a file is compiled. This option is unusable if you are not compiling a file.
Example

The following listing is an example which lists the contents of a file containing define directives.

Listing: Displays the contents of a file where define directives are present


-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