|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - D alpha compiler
This is mainly to help along discussion of language features and to see what fundamental issues I've overlooked! ftp://ftp.digitalmars.com/dmdalpha.zip Enjoy. -Walter Dec 08 2001
Walter wrote:This is mainly to help along discussion of language features and to see what fundamental issues I've overlooked! ftp://ftp.digitalmars.com/dmdalpha.zip Enjoy. -Walter Dec 08 2001
"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3C12991D.67140D22 deming-os.org...Walter wrote:This is mainly to help along discussion of language features and to see Dec 08 2001
Bug 0001: Trailing (superfluous) semicolons cause syntax errors.
I know, I know, all the style purists hate me for this...but somewhere, early
when I learned C++, I got into the habit of adding superfluous semicolons after
my functions and other blocks:
void foo()
{
....
};
It's ugly (to most people's eyes), but legal (I think)
--
The Villagers are Online! http://villagersonline.com
.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]
Dec 08 2001
"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3C12B1C5.47154D71 deming-os.org...Bug 0001: Trailing (superfluous) semicolons cause syntax errors. Dec 09 2001
I use it all over my MSVC code. Frankly, any superfluous semicolons should be treated by the compiler as null statements. I know that that is true in code, I can't swear that it's accurate in function body declarations...but I think that it's true there, too. -- The Villagers are Online! http://villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ] Dec 09 2001
Ok, I'll fix it to allow empty declarations, mainly to be symmetric with allowing empty statements. -Walter "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3C12B1C5.47154D71 deming-os.org...Bug 0001: Trailing (superfluous) semicolons cause syntax errors. I know, I know, all the style purists hate me for this...but somewhere, Dec 09 2001
Bug 0002: Link problems
I compiled the following source file, wanting to test out how the GC works:
import stdio;
class Foo
{
static this() { printf("%p ",this); }
~this () { printf("~%p ",this); }
}
int main()
{
{
Foo ptr = new Foo;
printf("x");
}
printf("x");
long i;
for(i=0; i<1000*1000*1000; i++);
printf("x");
return 0;
}
My makefile was as follows:
russ.exe: russ.obj
link ..\lib\phobos.lib ..\lib\snn.lib russ.obj
russ.obj: russ.d
mars russ.d -I..\src\phobos
I get the following errors on the link:
link ..\lib\phobos.lib ..\lib\snn.lib russ.obj
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
..\lib\snn.lib(stream) Offset 3CFB1H Record Type 00C3
Error 1: Previous Definition Different : ?WS YAAAVistream AAV1 Z
(istream &c
decl WS(istream &))
..\lib\snn.lib(_wfopen) Offset 51C1DH Record Type 00C3
Error 1: Previous Definition Different : __WFOPEN
..\lib\snn.lib(wconstar)
Error 42: Symbol Undefined _wmain
..\lib\snn.lib(wwinstar)
Error 42: Symbol Undefined _wWinMain 16
..\lib\snn.lib(winstart)
Error 42: Symbol Undefined _WinMain 16
--- errorlevel 5
I have never used DM compilers before, so I downloaded dm823c.zip, extracted it,
dmdalpha.zip and extracted it, and then copied all the files in the dmd/
directory over into the corresponding ones in dm/
--
The Villagers are Online! http://villagersonline.com
.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]
Dec 08 2001
"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3C12B2C8.949F65F3 deming-os.org... Dec 09 2001
"Pavel Minayev" <evilone omen.ru> wrote in message news:9uvcm8$2dng$1 digitaldaemon.com...Now when I run it, Foo gets created but is never destroyed, even with 1000000000 iterations of loop! Shouldn't the GC run at the end of the program anyhow? Dec 09 2001
"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3C12B2C8.949F65F3 deming-os.org...Bug 0002: Link problems I compiled the following source file, wanting to test out how the GC Dec 09 2001
Walter wrote:The static is an error, it is now diagnosed. Dec 09 2001
I tried to use the compiler to link in a .lib file with something I was
compiling, since I've seen that done on gcc. I don't know if the DM d compiler
supports that sort of thing, but instead of reporting an error I get an "Illegal
Operation" window with the following line:
mars russ.d -I..\src\phobos ..\lib\phobos.lib
--
The Villagers are Online! http://villagersonline.com
.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]
Dec 08 2001
"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3C12B418.BF0C42F3 deming-os.org...I tried to use the compiler to link in a .lib file with something I was compiling, since I've seen that done on gcc. I don't know if the DM d Dec 09 2001
"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3C12B418.BF0C42F3 deming-os.org...I tried to use the compiler to link in a .lib file with something I was compiling, since I've seen that done on gcc. I don't know if the DM d Dec 09 2001
Program consists of two files:
// mod1.d
import mod2;
char[] name()
{
return "EvilOne";
}
int main(char[][] args)
{
greet();
}
// mod2.d
import mod1;
import stdio;
void greet()
{
printf(name());
}
First, I've compiled it as follows (repeating -I stuff omitted):
> mars mod1.d mod2.d
mod1.d(10): undefined identifier greet
OK, now vice-versa:
> mars mod2.d mod1.d
mod2.d(7): undefined identifier name
Then I decided to compile them separately:
> mars mod1.d
!!!Works!!!
> mars mod2.d
Internal error: ..\ztc\cgcs.c 348
Here, the order doesn't matter. mod2 always fails to
compile. Wassup?
Dec 09 2001
Now even more funny. I've made all identifiers in mod1
fully qualified:
// mod1.d, line 10
mod2.greet();
Compiling:
> mars mod1.d mod2.d
mod1.d(10): undefined identifier
Expression::toCBuffer('import').greet.greet
?WHAT THE?
Dec 09 2001
Ok, these are fixed. -Walter "Pavel Minayev" <evilone omen.ru> wrote in message news:9uvct6$2dq0$1 digitaldaemon.com... Dec 09 2001
Walter wrote:This is mainly to help along discussion of language features and to see what fundamental issues I've overlooked! ftp://ftp.digitalmars.com/dmdalpha.zip Enjoy. Dec 09 2001
While I intend to do some sort of open source license in the future, for the moment I think it's best that it be given some time to gel before multiple incompatible versions appear <g>. A colleague of mine is investigating what it would take to hook it up to GCC's back end. "Axel Kittenberger" <axel dtone.org> wrote in message news:9v0gf1$qt$1 digitaldaemon.com...Walter wrote:This is mainly to help along discussion of language features and to see what fundamental issues I've overlooked! ftp://ftp.digitalmars.com/dmdalpha.zip Enjoy. Dec 09 2001
Walter wrote:While I intend to do some sort of open source license in the future, for the moment I think it's best that it be given some time to gel before multiple incompatible versions appear <g>. A colleague of mine is investigating what it would take to hook it up to GCC's back end. Dec 09 2001
a wrote:You'll have to let us know how that goes. Frankly, I'm not in the mood to buy, install and setup windows in a semi-comfortable manner just to test an alpha compiler. Dec 09 2001
It's specifically a Win32 executable, not a DOS one. It doesn't push the API very hard, so if Wine works at all, then mars.exe should <g>. "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3C1429BB.ED2E6D27 deming-os.org...Speaking of which...is mars.exe specifically a Windows executable, or Dec 09 2001
On Sun, 09 Dec 2001 20:19:23 -0700, Russ Lewis wrote:Ofc, Walter, I don't expect you to support running your compiler under Wine...but I am very curious about whether it might work or not :) Dec 15 2001
Cool! "Christof Meerwald" <cmeerw web.de> wrote in message news:9vfoo4$ms4$1 digitaldaemon.com...On Sun, 09 Dec 2001 20:19:23 -0700, Russ Lewis wrote:Ofc, Walter, I don't expect you to support running your compiler under Dec 15 2001
"a" <a b.c> wrote in message news:3C14164B.913EF689 b.c...Walter wrote:While I intend to do some sort of open source license in the future, for Dec 09 2001
Walter wrote:While I intend to do some sort of open source license in the future, for the moment I think it's best that it be given some time to gel before multiple incompatible versions appear <g>. A Dec 10 2001
one of their applications to GPL if they use your library. Then require from patch contributions a copyright assignment like the GPL does (and Dec 10 2001
It's kind of a triviality, but gcc's -MM (list includes) is very useful to me. Having that work on the D compiler would be a high priority for me :) -- The Villagers are Online! http://villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ] Dec 09 2001
|