#43826: CodingStyle: compound literals Open Date: 2022-02-08 18:20 Last Update: 2022-02-08 19:07 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/43826 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=43826 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-02-08 19:07 Updated by: cazfi Comment: I suspect those uses that exist are relatively new code? While the CodingStyle has not said anything against them, I've believed that their use is to be avoided for compatibility reasons. Some research on their support should be done. Especially if Visual Studio now supports them, and what is the first version that does. It's also possible that we end allowing their use in specific contexts, e.g., if some compiler implements them partially. Like tcc does vararrays (which we may have not properly documented, the thing just came up recently when we had to revert strict compiler vararrays compliance check to one that checks just the specific case that freeciv uses). --------------------------------------------------------------------- Ticket Status: Reporter: alienvalkyrie Owner: (None) Type: Patches Status: Open Priority: 5 - Medium MileStone: 3.1.0 Component: Documentation Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Continued from #43809. Compound literals (which look similar to struct/unition initializers) are currently only used in very few places (most prominently, the requirement_fulfilled_by_* macros in common/requirements.h). We need to figure out / decide if and how we generally want to use them, and add that information to doc/CodingStyle. -- 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/43826 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=43826