Issue 149500
Summary Initialization of global pointers is accepted by clang++ but rejected by clang
Labels clang, clang:frontend
Assignees
Reporter benshi001
    For the following code,

```c++
unsigned int * p = &(*(unsigned int *)0x400);
```

clang++ accepts it, but clang rejects with error 
```bash
a.c:1:20: error: initializer element is not a compile-time constant
    1 | unsigned int * p = &(*(unsigned int *)0x400);
      | 
```


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to