1 ;Testname=warning; Arguments=-fbin -omacdef.bin -w+macro-defaults; Files=.stdout .stderr macdef.bin
2 ;Testname=nonwarning; Arguments=-fbin -omacdef.bin -w-macro-defaults; Files=.stdout .stderr macdef.bin
5 ; While defined to take one parameter, any invocation will
6 ; see two, due to the default parameter.
7 %warning
%0 %1 %2 %3 %4 %5
11 %MACRO mmac_var
1-2 a
,b
12 ; While defined to take one or two parameters, invocations
13 ; will see three, due to the default parameters.
14 %warning
%0 %1 %2 %3 %4 %5
19 %MACRO mmac_plus
1-2+ a
,b
20 ; This does not warn. Although this looks like two default
21 ; parameters, it ends up being only one: the "+" limits it
22 ; to two parameters; if invoked without a second parameter
23 ; the second parameter will be "a,b".
24 %warning
%0 %1 %2 %3 %4 %5
25 ;Check rotating behaviour
29 mmac_plus one
,two
,three
31 %MACRO mmac_star
1-* a
,b
32 ; This does not warn. Because the "*" extends the range of
33 ; parameters to infinity, the "a,b" default parameters can
34 ; not exceed that range.
35 %warning
%0 %1 %2 %3 %4 %5
39 mmac_star one
,two
,three
41 %MACRO mmac_rotate
0-* a
,b
42 %warning
%0 %1 %2 %3 %4 %5
43 ;%rotate should rotate all parameters
45 %warning
%0 %1 %2 %3 %4 %5
50 mmac_rotate one
,two
,three
52 ;Scope / evaluation time test
57 %MACRO mmac_scope
0 I J K