[Issue 4709] ICE(mtype.c): undefined variable in const struct

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 6 17:04:03 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4709


Jeremy <jerminatorster+dbugs at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jerminatorster+dbugs at gmail.
                   |                            |com


--- Comment #2 from Jeremy <jerminatorster+dbugs at gmail.com> 2010-11-06 17:02:59 PDT ---
I get this same bug using 'alias const', eg:

alias int ITEMIDLIST_ABSOLUTE;
alias const ITEMIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE;

Gives the same compile error:
Assertion failure: 'tn->mod & MODimmutable || tn->mod & MODconst' on line 875
in file 'mtype.c'

This also happens if you use a struct:

struct ITEMIDLIST_ABSOLUTE
{
    int foo;
}
alias const ITEMIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE;

But *not* if you use a primitive type directly:

alias const int *PCIDLIST_ABSOLUTE;

Removing the const also avoids the error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list