[Issue 22876] importC: expression parsing affected by parentheses that should do nothing

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 11 20:53:11 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22876

duser at neet.fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|importC: ambiguous cast     |importC: expression parsing
                   |affects expression parsing  |affected by parentheses
                   |                            |that should do nothing

--- Comment #1 from duser at neet.fi ---
one more example that i forgot to add:

void fn()
{
        int *p;
        // Error: `p` is not of integral type, it is a `int*`
        // Error: `cast(int*)1` is not of integral type, it is a `int*`
        // works if parentheses around (p) are removed
        unsigned x = (unsigned)(p) & 1;
}

there's no ambiguous cast in this one so i've changed the issue title to
something that should apply to all the examples

--


More information about the Digitalmars-d-bugs mailing list