An Anti-Big Feature Request

jcc7 technocrat7 at gmail.com
Mon Dec 17 10:38:32 PST 2007


== Quote from Dan (murpsoft at hotmail.com)'s article

...

> At the moment, Walnut cannot compile with DMD 1.21 or later because of some bug
or unmentioned feature implemented in that version.  It has something to do with
> struct Value {
>   union {
>    struct {}
>    int i;
>    bool b;
>    char[] c;
>   bla bla.
> }
> and later doing something with b.  I'd be able to say more, but the error
message is 100% ambiguous and doesn't mention a file or line number.

I worked on reducing the error to a small example, and I filed a related bug:
http://d.puremagic.com/issues/show_bug.cgi?id=1738

In the process of reducing the error, I guess I lost some of the context for the
error, but I think it seems to be related to the assignment of FALSE in structure.d:
#   FALSE = { b:false, type:TYPE.BOOLEAN, access:ACCESS.READ },


Note that I'm not defending that DMD rejects your code. My bug report only gives
an example of an error message that should include a line number. I hope this
helps, but it looks like the compiler is malfunctioning in a couple of ways when
it tries to process your code. I only identified one of the malfunctions (lack of
a line number).


By the way, to come up with the reduced example, I basically used the method
described at:
http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/BugReports


> The exact string I get looks like:
> C:\Code\walnut>make
> dmd bla bla bla
> Error: 'b' is not a member of 'Value'
> --- errorlevel 1
> Regards,
> Dan




More information about the Digitalmars-d mailing list