diff options
| author | Konstantin Kirik (snegovick) <snegovick@uprojects.org> | 2025-12-04 18:39:51 +0300 |
|---|---|---|
| committer | Konstantin Kirik (snegovick) <snegovick@uprojects.org> | 2025-12-04 18:39:51 +0300 |
| commit | a22bdd20a50cc39d19866d6dc220d1f6b15c627a (patch) | |
| tree | 39c1b172a1e5b5839a685d4b63eb649d857c1806 /utils/qa | |
| parent | f9ec9dfafe84e1bafa3cbde074c09b1a39c9d8c6 (diff) | |
Rewrite anonymous structs to stop compiler complaints about multiple definitions
Diffstat (limited to 'utils/qa')
| -rw-r--r-- | utils/qa/a.h | 10 | ||||
| -rw-r--r-- | utils/qa/lex.c | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/utils/qa/a.h b/utils/qa/a.h index f7fce238..a0163ed5 100644 --- a/utils/qa/a.h +++ b/utils/qa/a.h @@ -55,11 +55,12 @@ struct Sym }; #define S ((Sym*)0) -struct +struct s_fi { char* p; int c; -} fi; +}; +extern struct s_fi fi; struct Io { @@ -71,11 +72,12 @@ struct Io }; #define I ((Io*)0) -struct +struct s_h { Sym* sym; short type; -} h[NSYM]; +}; +extern struct s_h h[NSYM]; struct Gen { diff --git a/utils/qa/lex.c b/utils/qa/lex.c index afa3a708..0d79cf1a 100644 --- a/utils/qa/lex.c +++ b/utils/qa/lex.c @@ -3,6 +3,9 @@ #include "y.tab.h" #include <ctype.h> +struct s_fi fi; +struct s_h h[NSYM]; + void main(int argc, char *argv[]) { |
