#48849: gcc-14: city_from_wonder() out-of-bounds array subscript Open Date: 2023-10-15 21:50 Last Update: 2023-10-17 18:33 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/48849 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48849 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-10-17 18:33 Updated by: cazfi * Status Update from Open to Closed * Resolution Update from Accepted to Fixed --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: cazfi Type: Bugs Status: Closed Priority: 5 - Medium MileStone: 3.0.9 Component: General Severity: 5 - Medium Resolution: Fixed --------------------------------------------------------------------- Ticket details: gcc-14 development version, S3_1: ../../../src/common/improvement.c: In function 'city_from_wonder': ../../../src/common/improvement.c:874:33: error: array subscript -1 is below array bounds of 'const int[200]' [-Werror=array-bounds=] 874 | int city_id = pplayer->wonders[improvement_index(pimprove)]; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../../../src/common/game.h:35, from ../../../src/common/improvement.c:27: ../../../src/common/player.h:301:7: note: while referencing 'wonders' 301 | int wonders[B_LAST]; /* contains city id's, WONDER_NOT_BUILT, -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/48849 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48849