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

Fixing C Incomplete Array to be treated as a Constant Array of length 1 #374

Merged
merged 1 commit into from
Aug 14, 2022

Conversation

tannergooding
Copy link
Member

This resolves #366 and ensures IncompleteArray is treated the same as ConstantArray with Size=0 given this is how MSVC and Clang both handle it.

I'm going to separately work on also adding a --with-specified-length parameter to the command line. This will allow the AsSpan() helper codegen to use the correct length coming from the relevant associated param/field for non-primitive fixed-sized buffers.

Such a parameter would also allow the relevant metadata to be emitted as an associated attribute where relevant. Ideally in the future we could also automatically pull such info from the SAL annotations.

@tannergooding tannergooding merged commit f052859 into dotnet:main Aug 14, 2022
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.

ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION not getting marked as unsafe when it contains a pointer
1 participant