www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 656] New: lazy in main

reply d-bugmail puremagic.com writes:
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 users.sf.net
        ReportedBy: csantander619 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?


-- 
Dec 06 2006
next sibling parent Kirk McDonald <kirklin.mcdonald gmail.com> writes:
d-bugmail 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 users.sf.net
         ReportedBy: csantander619 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
Dec 06 2006
prev sibling next sibling parent reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=656







 d-bugmail 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. --
Dec 06 2006
parent reply Brad Roberts <braddr puremagic.com> writes:
Are all of these recent bug reports specific to dgcc/gdc?  I suspect that 
most of them are going to be present in dmd.  Unless they're specific to 
gdc, the best category to file them would be under dmd.  Only bugs 
specific to gdc should be filed against gdc since it relies on the dmd 
front end for the majority of the heavy lifting.

Later,
Brad
Dec 06 2006
parent Carlos Santander <csantander619 gmail.com> writes:
Brad Roberts escribió:
 Are all of these recent bug reports specific to dgcc/gdc?  I suspect that 
 most of them are going to be present in dmd.  Unless they're specific to 
 gdc, the best category to file them would be under dmd.  Only bugs 
 specific to gdc should be filed against gdc since it relies on the dmd 
 front end for the majority of the heavy lifting.
 
 Later,
 Brad
I don't know because I can't test them with DMD, but I would guess most of them are also present there. -- Carlos Santander Bernal
Dec 06 2006
prev sibling next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail puremagic.com schrieb am 2006-12-06:
 http://d.puremagic.com/issues/show_bug.cgi?id=656
 Using GDC rev-50.

 //---------
 int main (lazy char [][] args)
 {
         return args.length;
 }
 //---------
 $ gdmd test
 $ ./test 
 Illegal instruction
 $ ./test foo
 Illegal instruction
 //---------
Test cases: http://dstress.kuehne.cn/nocompile/m/main_07_A.d http://dstress.kuehne.cn/nocompile/m/main_07_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFd/grLK5blCcjpWoRApB+AKCuGR53dT3Z3nkewSWlDor7/CbldQCgrXIR AMltN0Pxbd0QYw3PEMCcqwQ= =KlJL -----END PGP SIGNATURE-----
Dec 07 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=656


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 0.176


-- 
Dec 12 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=656


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |braddr puremagic.com



*** Issue 895 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 31 2012