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 syntax.function-declarator definition in the specification and .ifc produced by MSVC #59

Closed
AndreyG opened this issue Aug 23, 2022 · 2 comments

Comments

@AndreyG
Copy link
Contributor

AndreyG commented Aug 23, 2022

The definition of Syntax.FunctionDeclarator looks like

struct {
    SyntaxIndex parameters;
    SyntaxIndex eh_spec;
    SourceLocation left_paren;
    SourceLocation  right_paren;
}

in the specification right now (sec:ifc:SyntaxSort:FunctionDeclarator), so its sizeof should be equal 24, but entry_size in the partition "syntax.function-declarator" produced by MSVC (IFC-version 0.41) is equal to 44.

GabrielDosReis added a commit that referenced this issue Aug 24, 2022
The structure of `SyntaxSort::FunctionDeclarator` was incomplete.  Fixed thusly.
GabrielDosReis added a commit that referenced this issue Aug 24, 2022
The structure of `SyntaxSort::FunctionDeclarator` was incomplete.  Fixed thusly.
GabrielDosReis added a commit that referenced this issue Aug 24, 2022
The structure of `SyntaxSort::FunctionDeclarator` was incomplete.  Fixed thusly.
GabrielDosReis added a commit that referenced this issue Aug 24, 2022
The structure of `SyntaxSort::FunctionDeclarator` was incomplete.  Fixed thusly.
@DarkArc
Copy link

DarkArc commented Aug 24, 2022

Gaby, looks like this still needs ~3 bytes of padding (or something else?) added, the additional fields bring the byte count up to 41 (adding 16 w/ the source locations and 1 with the function type traits).

Thanks

@GabrielDosReis
Copy link
Collaborator

Gaby, looks like this still needs ~3 bytes of padding (or something else?) added, the additional fields bring the byte count up to 41 (adding 16 w/ the source locations and 1 with the function type traits).

Ah. All structures are 4-byte aligned. The missing 3 bytes are the padding at the end of structure after the trait field.

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

No branches or pull requests

3 participants