[Issue 656] lazy in main

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 6 14:53:13 PST 2006


http://d.puremagic.com/issues/show_bug.cgi?id=656





------- Comment #2 from csantander619 at gmail.com  2006-12-06 16:53 -------
(In reply to comment #1)
> d-bugmail at puremagic.com wrote:
> > http://d.puremagic.com/issues/show_bug.cgi?id=656
> > 
> > //---------
> > 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.
> 

Neither do I, but if it's not supposed to be valid, the compiler shouldn't
compile it.


-- 




More information about the D.gnu mailing list