Skip to content

clang hangs when compiling non-trivial designated initializers #8961

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

Closed
drhaozhong opened this issue Apr 6, 2023 · 1 comment
Closed

clang hangs when compiling non-trivial designated initializers #8961

drhaozhong opened this issue Apr 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@drhaozhong
Copy link

drhaozhong commented Apr 6, 2023

The code is as follows:

static char * name[] = { [0x80000000] = "bar" };
The compilation hangs, and a message is as follows:

.c:2:2: warning: array designators are a C99 extension [-Wc99-designator]
[0x80000000] = "bar"
^~~~~~~~~~~~
.c:2:17: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
[0x80000000] = "bar"
^
^C

@drhaozhong drhaozhong added the bug Something isn't working label Apr 6, 2023
@dm-vodopyanov
Copy link
Contributor

Closing due to #8967 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants