Skip to content

Port "Enable use of GNU C extension - const statement expression as array size" #459

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

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

AGindinson
Copy link

This patch partially reverts the commit:
llvm/llvm-project@6781fee

For backward compatibility, we still need to support the
expressions like:

const int size = ({ false; }) ? 0 : 1;
float array[size];

https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html

This is a cherry-pick of commit bf679f4 from CClang 14 branch.

…rray size"

This patch partially reverts the commit:
llvm/llvm-project@6781fee

For backward compatibility, we still need to support the
expressions like:
```
const int size = ({ false; }) ? 0 : 1;
float array[size];
```
https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html

This is a cherry-pick of commit bf679f4 from CClang 14 branch.
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.

3 participants