| Issue |
54215
|
| Summary |
Improvement: diagnose undefined behavior: within a translation unit the same identifier appears with both internal and external linkage
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
pmor13
|
```
static int x;
void f(void)
{
int x;
{
extern int x;
}
}
```
Expected diagnostics:
```
t0.c:7:20: error: the same identifier 'x' appears with both internal and external linkage
7 | extern int x;
```
C11:
> If, within a translation unit, the same identifier appears with both internal and external linkage, the behavior is undefined.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs