separate tags and typedefs

C has two namespaces and the database had one. A typedef of a tag's
name wiped it.

Tags, i.e. struct, enum and union, share one namespace; they move to a
table of their own. A name resolves the way C does: the ordinary
identifier first, the tag when that leads nowhere.

While resolving a typedef, the target was taken apart with cadr
whatever it was, so (typedef points (¤ point 4)) reported point's
fields as its own -- an array of four points claiming to be a point,
and a macro reaching through it with v->x. Only a name and
(struct|union|enum NAME) name a type now.
This commit is contained in:
2026-09-21 00:46:15 +03:00
parent e0a228c66e
commit 381ad21d8b
5 changed files with 72 additions and 16 deletions

View File

@@ -9,6 +9,7 @@
map-fields
get-type-info
get-tag-info
get-fields
get-underlying-type)
"../types.scm")