Menu ▾ ▴

#3020 Internal error when converting pointer to member to unsigned char *

closed-fixed
None
Front-end
5
2023-01-26
2020-06-06
No
struct s
{
        int name;
};

unsigned char *x = ((unsigned char *)&((struct s *)0)->name);

With sdcc test.c, this results in Internal error: validateOpTypeConst failed in OP_VALUE(op) @ SDCCicode.c:1226: expected value, got symbol. Tested with commit 11647.

Related

Wiki: NGI0-Entrust-SDCC

Discussion

  • Philipp Klaus Krause

    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
    • Category: other --> Front-end
     
  • Philipp Klaus Krause

    This works for me as of [r13827]. I suspect my fix for [bugs:#2983] covers this case, too.

     

    Related

    Bugs: #2983
    Commit: [r13827]


Log in to post a comment.