Skip to content

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

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

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.
Copy link
Contributor

@wenju-he wenju-he left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenju-he
Copy link
Contributor

wenju-he commented Jun 7, 2023

do we need this on 16 branch?

@wenju-he wenju-he requested a review from haonanya June 7, 2023 06:15
@AGindinson
Copy link
Author

do we need this on 16 branch?

Good point - #459 created.

@haonanya haonanya merged commit 4d064e2 into intel:ocl-open-150 Jun 7, 2023
@AGindinson AGindinson deleted the port-14-to-15-const-statement branch June 7, 2023 08:02
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.

4 participants