Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divergence between template-decl definition in the specification and .ifc produced by MSVC #8

Closed
AndreyG opened this issue Oct 29, 2021 · 3 comments · Fixed by #12
Closed

Comments

@AndreyG
Copy link
Contributor

AndreyG commented Oct 29, 2021

According to the definition of template-decl-structure (sec:ifc:DeclSort:Template) its sizeof should be equal 40, but entry_size in the partition "decl.template" produced by MSVC (IFC-version 0.33) is equal to 44. Maybe uint32_t padding-or-reserved; should be added to the end of template-decl-structure?

@GabrielDosReis
Copy link
Collaborator

in the partition "decl.template" produced by MSVC (IFC-version 0.33) is equal to 44

Which version of the MSVC compiler are you using? Make sure you use an MSVC compiler that reports IFC version 0.40 -- the same as the version in this document.

@AndreyG
Copy link
Contributor Author

AndreyG commented Oct 29, 2021

I have updated MSVC to the latest available version 19.30.30705 and IFC-version is 0.40 now, but entry_size in the partition "decl.template" is still equal to 44.

@cdacamar
Copy link
Collaborator

Here's the sum I come up with:

TemplateDecl:

  • NameIndex -> 4 bytes
  • SourceLocation -> 8 bytes
  • DeclIndex -> 4 bytes
  • ChartIndex -> 4 bytes
  • ParameterizedEntity
    • DeclIndex -> 4 bytes
    • SentenceIndex -> 4 bytes
    • SentenceIndex -> 4 bytes
    • SentenceIndex -> 4 bytes
  • BasicSpecifiers -> 1 byte
  • Access -> 1 byte
  • ReachableProperties -> 1 byte
  • (padding) -> 1 byte

Sum: 40.

@GabrielDosReis it appears as if we're missing the template decl 'type' field in the documentation. It should appear immediately after the parameterized entity block.

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 a pull request may close this issue.

3 participants