No more flexible array members (not standard C++) (#1307)

* Replace FAMs with `std::vector`s (or one `std::string`) in four `struct`s

* Anonymous types declared in an anonymous union are also non-standard
  Only Clang complains about this (-Wnested-anon-types)
This commit is contained in:
Sylvie
2024-02-22 16:22:37 -05:00
committed by GitHub
parent 6d29d2a67e
commit c0d534f5ad
12 changed files with 170 additions and 203 deletions

View File

@@ -28,6 +28,12 @@ extern bool beVerbose;
extern bool isWRA0Mode;
extern bool disablePadding;
// Only used in an anonymous union by `struct FileStackNode`
struct reptNodeData {
uint32_t depth;
uint32_t *iters;
};
struct FileStackNode {
struct FileStackNode *parent;
// Line at which the parent context was exited; meaningless for the root level
@@ -36,10 +42,7 @@ struct FileStackNode {
enum FileStackNodeType type;
union {
char *name; // NODE_FILE, NODE_MACRO
struct { // NODE_REPT
uint32_t depth;
uint32_t *iters;
} rept;
struct reptNodeData rept; // NODE_REPT
};
};