[Issue 656] New: lazy in main
Kirk McDonald
kirklin.mcdonald at gmail.com
Wed Dec 6 14:44:46 PST 2006
d-bugmail at puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=656
>
> Summary: lazy in main
> Product: GDC
> Version: unspecified
> Platform: Macintosh
> OS/Version: Mac OS X
> Status: NEW
> Severity: normal
> Priority: P2
> Component: glue layer
> AssignedTo: dvdfrdmn at users.sf.net
> ReportedBy: csantander619 at gmail.com
>
>
> Using GDC rev-50.
>
> //---------
> int main (lazy char [][] args)
> {
> return args.length;
> }
> //---------
> $ gdmd test
> $ ./test
> Illegal instruction
> $ ./test foo
> Illegal instruction
> //---------
>
> How valid is this code?
>
>
It shouldn't be valid. At the very bottom of
http://digitalmars.com/d/function.html it says:
main() must be declared using one of the following forms:
void main() { ... }
void main(char[][] args) { ... }
int main() { ... }
int main(char[][] args) { ... }
int main(lazy char[][] args) isn't any of these. I'm not even sure what
it's supposed to mean.
--
Kirk McDonald
Pyd: Wrapping Python with D
http://pyd.dsource.org
More information about the D.gnu
mailing list