i960 Processor Compiler User's Guide
3-26
3
D (Define)
Define a symbol.
D
symbol
[=
value
]
symbol
is a symbolic name.
value
is a value. The value can be any string.
Default
If you define
symbol
without specifying
value
, the preprocessor assigns
the value 1 to
symbol
.
Discussion
Use the D (Define) option to create a symbol with a given
value
. You can
use the
D (Define) option more than once in an invocation.
You can use the
D (Define) option with conditional compilation to create
macros to select source text during preprocessing. A macro defined in the
invocation command remains in effect for each module compiled, unless
you remove the macro with the
#undef preprocessor directive or the U
(Undefine) option. The compilation system processes all the U (Undefine)
options in a command-line only after processing all the
D (Define) options.
For more information on C preprocessor macros, see C: A Reference
Manual.
Example
The following example invokes the preprocessor with D LONGPATH, so that
PATHLENGTH is defined with the value 128 in the source file. Since the
macro
LONGPATH is defined without a value, it defaults to 1:
ic960 -c -D LONGPATH proto.c