Menu ▾ ▴

#3767 Fails to compile with GCC 14 due to pic16 bug

closed-fixed
None
PIC16
5
2024-08-08
2024-08-08
No

A bug in the pic16 port (assignment between different pointer types without explicit cast), makes compilation fail with GCC 14:

glue.c: In function ‘pic16glue’:
glue.c:1805:11: error: assignment to ‘memmap *’ from incompatible pointer type ‘reg_info *’ [-Wincompatible-pointer-types]
 1805 |       reg = newReg (REG_SFR, PO_SFR_REGISTER, ramsize-1, "_sram_end", 0, 0, NULL);
      |           ^

Related

Bugs: #3775

Discussion

  • Philipp Klaus Krause

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

    I tried to fix this in [r14957]. SDCC with teh pic16 port enabled now compiles with GCC 14. Don't know if the fix is correct, but there are no regressions.
    I think the global reg memmap isn't used by the pic16 port at all, so using it as temporary storage in src/pic16/glue.c just worked without side effects.

     

    Related

    Commit: [r14957]


    Last edit: Philipp Klaus Krause 2024-09-02

Log in to post a comment.