[dmd-internals] A major root-cause bug

Walter Bright walter at digitalmars.com
Sat Nov 13 15:37:26 PST 2010


I'll look at it, but we're having a family thing this weekend.

Don Clugston wrote:
> While tracking down an ICE bug, I found this important issue.
>
> 5195 Forward references ignore const
>
> Most of the front-end uses the 'type' member of a variable to check,
> and assumes that if it's non-null,
> it hasn't been forward referenced.
> The problem is, if x is declared as  'const int *x' or  'const { int
> *x; }' , it has a non-null type member, but it doesn't have the const
> yet!
> This bogus type is a root of all kinds of evil. It manifests in a
> variety of weird ways.
> I think that several previously fixed bugs, were just special cases of this one.
>
> Unfortunately fixing this isn't just a one-liner. It requires a minor
> structural change, and I'm not sure which approach is the best way of
> fixing it.
> Essentially, all the qualifiers need to be resolved before any other
> semantic analysis takes place.
> Walter, can you comment?
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>
>
>   


More information about the dmd-internals mailing list