Is an optional list of comma-separated macro parameters.
By appending a macro parameter list to the macro name, you can define
function-style macros.
The parameter list must be enclosed in parentheses. When specifying
multiple parameters, do not include spaces between commas and parameter
names in the list.
Note
Parentheses might require escaping on UNIX systems.
=def
Is an optional macro definition.
If =def is omitted,
the compiler defines name as
the value 1.
To include characters recognized as tokens on the command
line, enclose the macro definition in double quotes.
Usage
Specifying -Dname has
the same effect as placing the text #define name at
the head of each source file.
Restrictions
The compiler defines and undefines macros in the following
order:
compiler
predefined macros
macros defined explicitly, using -Dname
macros explicitly undefined, using -Uname.
Example
Specifying the option:
-DMAX(X,Y)="((X > Y) ? X : Y)"
on the command line is equivalent to defining the macro:
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.