Skip to content

Comments

Structure symbol fix#34

Merged
simonowen merged 2 commits intosimonowen:mainfrom
adrianpbrown:main
Aug 28, 2025
Merged

Structure symbol fix#34
simonowen merged 2 commits intosimonowen:mainfrom
adrianpbrown:main

Conversation

@adrianpbrown
Copy link
Contributor

Fixed issue with structures defining symbols without prefix as well meaning two structures could not contain the same name element

@simonowen simonowen merged commit f0645b1 into simonowen:main Aug 28, 2025
12 checks passed
@simonowen
Copy link
Owner

I went to add a test for the described behaviour but it's passing in the old version, before your PR changes. Shouldn't this code fail to assemble?

Struct1:  struct
XPos:     rs  1
YPos:     rs  1
          ends

Struct2:  struct
YPos:     rs  2
XPos:     rs  2
          ends

          assert(Struct1.sizeof == 2)
          assert(Struct2.sizeof == 4)

          assert(Struct1.XPos == 0)
          assert(Struct1.YPos == 1)

          assert(Struct2.YPos == 0)
          assert(Struct2.XPos == 2)

@adrianpbrown
Copy link
Contributor Author

Strange, i got an error with that sort of thing, however i did have a fix for another issue as well at the time, cant recall exactly the repro but it would define Struct1 and Struct2 with the address of PC when it found them which it shouldnt have done. (The Struct1 and Struct2 should never have been marked as symbols on their own)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants