<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/70068>70068</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang doesn't complain about thread_local variable in file scope without extern or static.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
c,
clang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Fznamznon
</td>
</tr>
</table>
<pre>
Per 6.7.1 p4
> In the declaration of an object with block scope, if the declaration specifiers include thread_local,
they shall also include either static or extern.
gcc does complain.
Online demo https://godbolt.org/z/YorncrhKW
cc @AaronBallman
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkks9ynTwMxZ_GbDRhjLh_uAsWN8nHzDddtLtOVx1hC3ArbMY2aZOn78DNpE27gYWk46PzE6XkRs_cquO9Oj4WtOYpxLZ78TS_-OCLPtjn9hNHOJXnsoLloPSj0ldV_wf_e8gTg2UjFCm74CEMQB5C_41Nhh8uT9BLMN8hmbCwwgdwwz8zaWHjBscxgfNGVsuQp8hkv0owJAofbk_miZ8hTSQCJCm8NbPLE0dImbIzECLwz8zRl69G9-9oDNjACUyYFyH3vvrRi_ObqTnAlPOSVH1V2CnsxmD7ILkMcVTYvSjsvoToTZw-fP5TwBhQB32lGPw9iczkobBtbS_1hQpuq9OlqU6XqroUU4tEdjg0vW1OZ00Nk7ZW4_GER2SsUBeuRY11pfFQneumvpRNQ0ZX9XEwuh-IK3XQPJOTUuRp3qwVLqWV27PWp6YQ6lnSzhPRKMQtQEQj5EdVX4cYfGZvt8LxsYjtJnLXr2NSBy0u5fRbNrss3D5sk3t6XuE5v0UI1Ic1v2MFTxQd9cLgPAxO-AZ-v4St90ZmY3SjVRZrlPavyF2e1r40YVbYbVZef3dLDNtZKez2dZPCbt_4VwAAAP__U8PmaA">