Skip to content

Conversation

@bung87
Copy link
Collaborator

@bung87 bung87 commented Oct 14, 2022

Fix #20139

cause by hashType of tyObject not cover all branch.

… same name in the same file name in 2 different directories
@bung87 bung87 changed the title Fix20139 gcc error when constructing an object that has the same name in the same file name in 2 different directories Fix #20139 gcc error when constructing an object that has the same name in the same file name in 2 different directories Oct 14, 2022
c &= ".empty"
else:
if sfCompilerProc notin t.sym.flags:
c &= t.id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It we use the id regardless there is no reason to do this convoluted way of doing things. Instead hashSym needs to take into account "module1" vs "module2" but that doesn't work either. Not sure what to do here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before this module1 and module2 just hash its type kind, without if condition will produce duplicated TNimType, that's all I get.

Copy link
Collaborator

@beef331 beef331 Oct 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the lineInfo's FileIndex be used, or is that not temporally consistent enough?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not consistent enough for my taste. There is a better way but it's pretty intrusive...

@Varriount Varriount added the Requires Araq To Merge PR should only be merged by Araq label Oct 16, 2022
@ringabout ringabout removed the Requires Araq To Merge PR should only be merged by Araq label Jan 18, 2023
@ringabout
Copy link
Member

Succeeded by #21274

@ringabout ringabout closed this Mar 2, 2023
@bung87 bung87 deleted the fix20139 branch August 27, 2023 20:52
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.

gcc error when constructing an object that has the same name in the same file name in 2 different directories

5 participants