Skip to content

Enable use of GNU C extension - const statement expression as array size #411

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
Apr 7, 2023

Conversation

mnaczk
Copy link
Contributor

@mnaczk mnaczk commented Apr 6, 2023

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

…ize.

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
@mnaczk
Copy link
Contributor Author

mnaczk commented Apr 6, 2023

@hewj03 @haonanya @AGindinson Could you please take a look?

Copy link

@AGindinson AGindinson left a comment

Choose a reason for hiding this comment

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

The approach LGTM

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 wenju-he merged commit bf679f4 into intel:ocl-open-140 Apr 7, 2023
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