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

[dcl.fct] It is unclear whether zero-size arrays in function parameters are allowed #6575

Open
Eisenwave opened this issue Sep 20, 2023 · 0 comments

Comments

@Eisenwave
Copy link
Contributor

[dcl.fct] p5 does not sufficiently clarify the following case:

void foo(int[0]);

The type of int[0] is adjusted to int*.

I believe that the existing wording in [dcl.array] is sufficiently clear for this to be an editorial issue. int[0] is not a valid type, so an adjustment of it cannot retroactively make it valid.

We could add the following line to the example in the mentioned paragraph:

void j(int[0]); // ill-formed
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

1 participant