Remove sizeof() as a special-case default argument value.
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
(2) : error 141: natives, forwards, and public functions cannot return arrays
|
||||
(3) : error 143: new-style declarations should not have "new"
|
||||
(5) : error 121: cannot specify array dimensions on both type and name
|
||||
(9) : error 025: function heading differs from prototype
|
||||
(11) : error 025: function heading differs from prototype
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
stock void crab(int[] eggs, int numEggs = sizeof(eggs))
|
||||
{
|
||||
}
|
||||
|
||||
public main()
|
||||
{
|
||||
int eggs[12];
|
||||
crab(eggs);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
(1) : error 163: indeterminate array size in "sizeof" expression (symbol "eggs")
|
||||
Reference in New Issue
Block a user