<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/54203>54203</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Diagnostics: previous definition: incorrect line number
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          pmor13
      </td>
    </tr>
</table>

<pre>
    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.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVUtuS2yAM_Rr8wtRj41v84Idskn5BfwAb2VYHGw_gZPP3Fc6lO5nd7ZQBISF0dCRojbo2BzMtqHEeuB_R8c4oYNmeJUeW7FmZ3Odmng0q3jOxCwoT9f1S9XZTOA1_XUBBz3H2_J1l_-XpRmk_uFh1_JSFBqkc9-Yrliw7OLPajso40Z2CVrojwcFaY4PySGiDxBk9mplf0I9cYd-DBaIY7jhOtTJRBWK08XM4qKgAks_yv6mAvw5WnD7lmAeOVaA2Gx_azxcLZzSr4x8Y0uuMRO5fLX1px2VEDXwByw9pSm8ML5BUIkzLKB3pUinYHvbZ2uzEe2O5fOaa5QRMHG6Re5oBsUfr_M0MeBRgZn0lIMrVaWnllsz0W3pU1F_sEWx8T7LJXw-c72M4FfZOKxAgf3DS5wWeBVLUPZ7HkWoyVWe1jDx6Dc0R5TAb57FzX7Q2HOPcGWuh8ze8eZ1asNFqdTN6v4RIJn7SHOifrG3cmYkMrc-P7cdizW8KJxOdW8GRUuQiyaKxkUVRqL6uk1pAAl3S5z3soG0zSMu-a_NIyxa0a1jxxoSY4cI3CNJZcYywEYkgoCRPi6IUZdymnShVJcsqK6AqW5YnMEnUceARGztEttkotevgyKnReffXKZ3DYQbY0hG-XP1obLNMxqZZtGVuNuZ_AJr5P2U">