| Issue |
54203
|
| Summary |
Diagnostics: previous definition: incorrect line number
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
pmor13
|
Compiling this code:
```
void f(void)
{
typedef int x;
typedef int x;
typedef char x;
}
```
leads to:
```
<source>:5:18: error: typedef redefinition with different types ('char' vs 'int')
typedef char x;
^
<source>:4:17: note: previous definition is here
typedef int x;
```
while per C11 the definition is (emphasis added):
> for a typedef name, is **the first** (or only) declaration of the identifier.
The first declaration of the identifier `x` is on the line 3, not 4.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs