lazy in main

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Sep 7 00:59:27 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kirk McDonald schrieb am 2006-09-05:
> Carlos Santander wrote:
>> This compiles successfully:
>> 
>> int main (lazy char [][] args)
>> {
>>         return args.length;
>> }
>> 
>> But at runtime I get "Illegal instruction". Tested with gdc from SVN 
>> repos (uses dmd 0.166) on Mac OS X.
>> 
>
> I would call this a bug in the compiler. The spec states there are only 
> four valid forms of main:
>
> void main() { ... }
> void main(char[][] args) { ... }
> int main() { ... }
> int main(char[][] args) { ... }
>
> http://digitalmars.com/d/function.html
>
> Since that isn't one of them, I would think the compiler should issue an 
> error.

Added to DStress as
http://dstress.kuehne.cn/nocompile/m/main_07_A.d
http://dstress.kuehne.cn/nocompile/m/main_07_B.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFE/9ZHLK5blCcjpWoRAtB/AJ9RwF/tVkSjJber3vkS8mzZYHAxOwCfSRAm
qwpddA9mBw+tJ5Xg2gEDdVQ=
=yM84
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list