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

[ffi] Support inline array of variable length #52366

Open
dcharkes opened this issue May 12, 2023 · 1 comment
Open

[ffi] Support inline array of variable length #52366

dcharkes opened this issue May 12, 2023 · 1 comment
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. library-ffi P3 A lower priority bug or feature request triaged Issue has been triaged by sub team

Comments

@dcharkes
Copy link
Contributor

Right now we're disallowing inline arrays of length 0.

I believe when I added inline arrays, I read that length 0 is undefined behavior, so I disallowed length 0.

Declaring zero-length arrays is allowed in GNU C as an extension. A zero-length array can be useful as the last element of a structure that is really a header for a variable-length object

https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html

_Originally posted by @jpnurmi in dart-lang/native#450

We should double check.

@dcharkes dcharkes added area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. library-ffi labels May 12, 2023
@a-siva a-siva added P3 A lower priority bug or feature request triaged Issue has been triaged by sub team labels Dec 7, 2023
@dcharkes dcharkes changed the title [ffi] Support inline array's of length 0? [ffi] Support inline array of variable length Jun 10, 2024
@dcharkes
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. library-ffi P3 A lower priority bug or feature request triaged Issue has been triaged by sub team
Projects
None yet
Development

No branches or pull requests

2 participants