Jump to page: 1 2 3
Thread overview
D alpha compiler
Dec 08, 2001
Walter
Dec 08, 2001
Russ Lewis
Dec 09, 2001
Walter
Bug 0001
Dec 09, 2001
Russ Lewis
Dec 09, 2001
Pavel Minayev
Dec 09, 2001
Russ Lewis
Dec 09, 2001
Walter
Bug 0002 (or install mess-up?)
Dec 09, 2001
Russ Lewis
Re: Bug 0002 - install mess-up + GC bug
Dec 09, 2001
Pavel Minayev
Dec 10, 2001
Walter
Dec 10, 2001
Walter
Dec 10, 2001
Russ Lewis
Bug 0003: Illegal Operation when compiling a .d file with a .lib file
Dec 09, 2001
Russ Lewis
Dec 09, 2001
Pavel Minayev
Dec 10, 2001
Walter
cyclic imports bug
Dec 09, 2001
Pavel Minayev
Dec 09, 2001
Pavel Minayev
Dec 10, 2001
Walter
Dec 09, 2001
Axel Kittenberger
Dec 09, 2001
Walter
Dec 10, 2001
a
Dec 10, 2001
Russ Lewis
Dec 10, 2001
Walter
Dec 15, 2001
Christof Meerwald
Dec 15, 2001
Walter
Dec 10, 2001
Walter
Dec 10, 2001
Axel Kittenberger
Dec 10, 2001
Axel Kittenberger
Requested Feature: -MM
Dec 10, 2001
Russ Lewis
December 08, 2001
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


December 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

Would you like us to post bugs (other than not-implemented-features listed in
the docs)?

--
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))) ]


December 09, 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
what
> > fundamental issues I've overlooked!
> >
> > ftp://ftp.digitalmars.com/dmdalpha.zip
> >
> > Enjoy.
> >
> > -Walter
>
> Would you like us to post bugs (other than not-implemented-features listed
in
> the docs)?

I'm absolutely interested in any and all bug reports. Post away, there's nothing secret here! As for the bugs listed in the doc, I'm interested in what priorities people have for them. I need to get it whipped into shape before my DDJ article on D gets published!

-Walter


December 09, 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))) ]


December 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))) ]


December 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))) ]


December 09, 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.

> 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)

Not sure. I might be wrong, but AFAIK VC++ doesn't allow such things. Borland compilers do. Is it in ANSI C++ or not, I wonder?

Not sure I'd like to see it be legal in D, anyhow.


December 09, 2001
"Russ Lewis" <spamhole-2001-07-16@deming-os.org> wrote in message news:3C12B2C8.949F65F3@deming-os.org...

> 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
>

Use a different command to link OBJs:

    sc russ.obj

Works fine for me. I had modified the program a little:

    import stdio;

    class Foo
    {
     this() { printf("%p created\n", this); }
     ~this() { printf("%p destroyed\n", this); }
    }

    int main()
    {
     {
      Foo ptr = new Foo;
      printf("ptr %p out of scope\n", ptr);
      ptr = cast(Foo) null; // no effect
     }
     printf("waiting for gc...\n");
     for (long i = 0; i < 1000*1000; i++);
     printf("done\n");
     return 0;
    }

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?

Also note one weird thing. null is a void*, and is incompatible with any other pointers, requiring explicit cast! This should definitely be changed...


December 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
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

It might have just treated the LIB file as a D program... probably not the best idea. Anyhow, you should do it when linking:

    mars russ.d -I..\src\phobos
    sc russ.obj phobos.lib




December 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?


« First   ‹ Prev
1 2 3